Categories

Featured templates

WordPress. How to replace “Enter Title Here” placeholder text

Kristy Smith March 19, 2015
Rating: 5.0/5. From 2 votes.
Please wait...

This tutorial will show you how to replace “Enter Title Here” placeholder text in WordPress.

WordPress. How to Replace “Enter Title Here” placeholder text

  1. Open your WordPress admin panel. Select any type of posts. We will select events as an example. Add new one and in title area you will see this text “Enter title here”. You will need to replace it with your custom text:

    screen_1_change_placeholder_title

  2. Open WordPress admin panel, go to Appearance -> Editor. In small filter select your themeXXXXX. Then find custom-function.php file. At the end of this file before this sign ?> paste the following code:

    function wpb_change_title_text( $title ){
         $screen = get_current_screen();
     
         if  ( 'events' == $screen->post_type ) {
              $title = 'Enter event name with date';
         }
     
         return $title;
    }
     
    add_filter( 'enter_title_here', 'wpb_change_title_text' );
      

    In this line if ( ‘events’ == $screen->post_type ) you need to replace ‘events’ with the type of your post. Correct post type you can see when you add new post in browser url, for example: http://www.yoursite.com/wp-admin/post-new.php?post_type=events

    In this line $title = ‘Enter event name with date’ – you should put the text you want to be displayed in your title:

    screen_2_change_placeholder_title

  3. Click Update, then go to your posts, e.g. Events -> Add New and check your placeholder title.

    As you see it has been changed:

    screen_3_change_placeholder_title

Thank you for watching our tutorial. Now you know how to replace “Enter Title Here” placeholder text in WordPress.

Feel free to check the detailed video tutorial below:

WordPress. How to Replace “Enter Title Here” placeholder text

Creative Wordpress Themes
This entry was posted in WordPress Tutorials and tagged placeholder, text, title, WordPress. Bookmark the permalink.

Submit a ticket

If you are still unable to find a sufficient tutorial regarding your issue please use the following link to submit a request to our technical support team. We'll provide you with our help and assistance within next 24 hours: Submit a ticket