WP Smith

Creating WordPress & Genesis Websites Since 2010

  • Home
  • About
  • Services
  • Blog
  • Contact

Jun 16 2011

How to Change the Title Text for Your Custom Post Type

Understanding WordPress Custom Post Types

Have you ever wanted to use the Title section, but didn't want to call it Title? Surely, many of you have wanted to change the text in the title entry bar from the standard 'Enter title here' to something more specific for your custom post type. Well, WordPress has a filter for it.

[php]<?php
// Change 'Enter Title Here' text for a CPT
function wps_change_default_title( $title ){
$screen = get_current_screen();
$wps_cpt = 'wps_mycpt';

if ( $wps_cpt == $screen->post_type ) {
$title = 'Enter Staff Members Name Here'; //change this to whatever you'd like
}

return $title;
}

add_filter( 'enter_title_here', 'wps_change_default_title' );
[/php]

Written by Travis Smith · Categorized: Custom Post Types, WordPress

StudioPress Premium WordPress Themes     WP Engine Managed WordPress Hosting

What can I do for you!?

Custom Development

We develop plugins by determining both business/functional and technical requirements, following WordPress development best practices, and using agile methodology to ensure you get the best solution.

Consulting

Have questions? Need a reliable developer to consult? Please contact us today!

Customized Theme

We can customize your theme or child theme, or create a child theme for you based on your needs while enhancing the performance of every individual attribute.

Customized Plugin

We can customize your plugins, extend plugins (e.g., Gravity Forms, Jetpack, Soliloquy) based on your needs ensuring security, performance, and positive business impact.

Contact Us

About Travis Smith

As a WordPress enthusiast, developer, and speaker, Travis writes about what he learns in WordPress trying to help other WordPress travelers, beginners and enthusiasts with tutorials, explanations, & demonstrations.

Comments

  1. Dipesh says

    September 25, 2011 at 6:29 am

    Great, Thank You so much. I was looking for this feature in WordPress for so long. Thanks for sharing

    Reply
  2. Andrew says

    March 28, 2012 at 6:26 pm

    You’re awesome thank you for the snippet. I put it in my core functionality plugin. Hey when are you coming out with your updated genesis theme that you’re working on?

    Reply

Leave a Reply Cancel reply

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

This site uses Akismet to reduce spam. Learn how your comment data is processed.

  • Twitter
  • Facebook
  • LinkedIn
  • Google+
  • RSS

Copyright © 2025 � WP Smith on Genesis on Genesis Framework � WordPress � Log in