php - Change Wordpress Post Title Placeholder -



php - Change Wordpress Post Title Placeholder -

i'm creating custom post type , want manipulate placeholder text within title field of create new post section.

requirements: - can 1 specific post type, not posts. - cannot reflect name of post type, must custom text. - not have editable wordpress admin section, custom text can placed within function in functions.php file.

you can place snippet in functions.php

function change_default_title( $title ){ $screen = get_current_screen(); if ( 'your_custom_post_type' == $screen->post_type ){ $title = 'your custom placeholder text'; } homecoming $title; } add_filter( 'enter_title_here', 'change_default_title' );

that should alter titel.

found on: https://gist.github.com/fstop/3094617

php wordpress

Comments

Popular posts from this blog

Delphi change the assembly code of a running process -

json - Hibernate and Jackson (java.lang.IllegalStateException: Cannot call sendError() after the response has been committed) -

C++ 11 "class" keyword -