When your website means business.

«Return to Blog List Code: Changing Title Fields for Custom Post Types

Nice little function to make the WordPress CMS a little better. Add to theme’s functions.php.

//change title fields 
function change_default_title( $title ){
     $screen = get_current_screen();
     if  ( 'news' == $screen->post_type ) {
          $title = 'News Title (make it interesting so people will click on it)';
     }
	 if  ( 'documents' == $screen->post_type ) {
          $title = 'Document Title';
     }
	 if  ( 'articles' == $screen->post_type ) {
          $title = 'Article Title';
     }
	 if  ( 'resources' == $screen->post_type ) {
          $title = 'Resource Title';
     }
     return $title;
}
add_filter( 'enter_title_here', 'change_default_title' );

Tags:

Comments are closed.

We use cookies in order to give you the best possible experience on our website. By continuing to use this site, you agree to our use of cookies.
Accept