Custom Post Type – Title and Editor Not Displaying – WordPress Tip

If you’ve been working on adding a custom post type into your WordPress theme, only to fall flat when, inexplicably, the title and editor in the post edit screen have disappeared, have no fear! Here is the common cause.

If you don’t add ‘supports’ => array( ) into your custom post type registration, then at the very least WordPress assumes you still want to be able to add a title and content for your posts. But let’s say you wanted to add a featured image as well. So you Googled “add featured image option to custom post type”  and you found that all you have to do is add this:

So you added it. And poof! There goes your title and content editor. The problem is that there are multiple arguments you can put into “supports,” and if you declare it but don’t include those arguments that would have otherwise been enabled, it assumes you don’t want them. Two of those arguments are ‘title’ and ‘editor’. So the solution is simply to add those in, so your code now looks like this:

Pretty simple! Hopefully that will fix your problem. If you need additional help with your custom post types, check out the page WordPress has about them or email me at brian@pagecrafter.com or tweet at me at @brianjonline.

About Brian Johnson

Brian Johnson is a website developer and designer living in Minneapolis, Minnesota with a passion for code and WordPress. He spends his days building WordPress websites for small businesses, developing new code with the online community, and living life.

7 Comments on “Custom Post Type – Title and Editor Not Displaying – WordPress Tip”

  1. Thank you so much!
    I had removed the ‘editor’ from the code along with ‘author’, because I didn’t want to show who authored and edited the posts. And then I couldn’t figure out why I had no no editor to add my content! Haha!

    I didn’t find this info anywhere else and was going nuts. So thanks!! :oD

  2. Thank you! I’m not sure what happened as I thought the title was displayed before. Maybe a recent WordPress update forced this or maybe I didn’t realize it earlier. Either way, adding ‘title’ to the supports array made it show up. Perfect!

Leave a Reply

Your email address will not be published. Required fields are marked *