Beginner's Guide for WordPress / Start your WordPress Blog in minutes

How to Replace ‘Enter Title Here’ Text in WordPress

WordPress displays ‘Enter title here’ placeholder text in the title field when you create a new post. Recently one of our users asked if they can replace it with their own placeholder text. This is particularly useful when you are using custom post types or creating a custom CMS for clients. In this article, we will show you how to replace ‘Enter title here’ text in WordPress.

Replacing default title placeholder text with custom text

Video Tutorial

Subscribe to WPBeginner

If you don’t like the video or need more instructions, then continue reading.

When and Why You Need to Replace Title Placeholder Text?

Let’s say you have created a custom post type to create personal profiles, and you want the person’s name to be used as the title. By replacing the placeholder text, you can instruct users to use this field to enter the name.

You can create any type of content, and there is no reason why you should be using a generic text when you can make it more helpful for users.

Replacing The Title Placeholder Text in WordPress

All you need to do is add this code in your theme’s functions.php file or a site-specific plugin.

function wpb_change_title_text( $title ){
     $screen = get_current_screen();
     if  ( 'movie' == $screen->post_type ) {
          $title = 'Enter movie name with release year';
     return $title;
add_filter( 'enter_title_here', 'wpb_change_title_text' );

Don’t forget to replace ‘movies’ with your own custom post type, and the text with your own custom text.

Let us explain the code. First we created a function wpb_change_title_text. Inside the function, we added a check to see if the user is on a particular custom post type screen.

When it detects that a user is on that particular custom post type screen, then it should return our custom title text. After that we simply hooked our function to the enter_title_here filter which allows you to change the default title text.

That’s all, you can now create a new entry in your custom post type and you will see your own custom placeholder text in the title field.

We hope this article helped you replace ‘Enter title here’ text in WordPress post editor. You may also want to check out our guide on how to add default content in WordPress post editor.

If you liked this article, then please subscribe to our YouTube Channel for WordPress video tutorials. You can also find us on Twitter and Google+.

Source: Paulund

Disclosure: Our content is reader-supported. This means if you click on some of our links, then we may earn a commission. See how WPBeginner is funded, why it matters, and how you can support us.

The Ultimate WordPress Toolkit

Get FREE access to our toolkit – a collection of WordPress related products and resources that every professional should have!

Reader Interactions

6 CommentsLeave a Reply

  1. Really.. great tutorial. It has helpmed a lot. I have small question. how to change “Title” column to my “custom colomn” in custom post type list and i want to give edit option for that custom column as like “title”. I have been to google about this, it has been found that, by default “Title” comes with “Edit, Trash” etc links. but I want to change “title” to custom column with same edit, trash columns. Thanks in advance.

  2. This is pretty easy to fix, nice one.

    I have a quick question regarding the functions.php. I’ve seen people adding functions in separate .php files in their “inc” folder of their theme. To this day I’m unsure on how to link these other files into the functions.php. Any idea?

  3. Very nice! I was just contemplating how to do this for a plugin before I went to bed last night. You guys just made my day a lot better! :)

Leave A Reply

Thanks for choosing to leave a comment. Please keep in mind that all comments are moderated according to our comment policy, and your email address will NOT be published. Please Do NOT use keywords in the name field. Let's have a personal and meaningful conversation.