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

How to Replace ‘Add Title’ Placeholder Text in WordPress

Do you need to change the default placeholder text that’s displayed when creating a new post in WordPress?

When you create a new post, you’ll see the placeholder text ‘Add title’. There may be times that it’s more useful to display different text.

In this article, we’ll show you how to replace the ‘Add title’ placeholder text in WordPress.

How to Replace 'Add Title' Text in WordPress

When and Why You Need to Replace Title Placeholder Text

When creating a new post on your WordPress website, the placeholder text ’Add title’ is a helpful prompt that lets you and your authors know how to get started. That’s true whether you use the block editor or classic editor.

Placeholder Text for New Post

However, when you are using custom post types or creating a custom CMS for clients, it can be more useful to your users to change the text to something less generic.

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.

Or if you have created a custom post type for a movie database, then a more helpful placeholder text might be ‘Enter movie name with release year’.

With that being said, let’s have a look at how to replace ‘Add title’ text in WordPress.

Replacing The Title Placeholder Text in WordPress

To replace the title placeholder text in WordPress, you’ll need to add a code snippet to your theme’s functions.php file. If you need help adding code to your site, then you can follow our beginner’s guide on how to paste snippets from the web into WordPress.

All you need to do is add this code to 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 ‘movie’ with your own custom post type, and the text ‘Enter movie name with release year’ with your own custom text.

This code will change the placeholder text for the custom post type ‘movie’ when using the block editor.

Placeholder Text Replaced in Gutenberg Editor

The best thing is that the same code snippet will also work if you are using the classic WordPress editor.

Placeholder Text Replaced in Classic Editor

How Does This Code Snippet Work?

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 will 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 tutorial helped you learn how to replace the ‘Enter title here’ or ‘Add title’ placeholder text in WordPress. You may also want to learn how to create an email newsletter the right way, or check out our list of must have plugins to grow your site.

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

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.