WordPress Development Stack Exchange is a question and answer site for WordPress developers and administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I'm modifying the layout and content of the wordpress admin panel using a custom plugin. For most sections I have been able to change the page heading (i.e. the title wrapped in h2 tags at the top of each page), however I've been unable to do so for sections to relating post types, specifically adding and editing posts and pages.

Currently when adding a new page to the wordpress site, the heading is 'Add New Page', but I'd like to be able to modify this text - so far I've been searching for the hook to do this but have been unable to find one.

share|improve this question
up vote 2 down vote accepted

In wp-admin/edit.php at line 189 you can see that the title text is grabbed from the labels of the post type:

<h2><?php echo esc_html( $post_type_object->labels->name ); ?> ... </h2>

When you register a new post type (register_post_type) you can also define its labels. The available labels are listed in the Codex.

share|improve this answer

I was looking for this and found another link. Posting it here for someone in the future.


share|improve this answer
While this link may answer the question, it is better to include the essential parts of the answer here and provide the link for reference. Link-only answers can become invalid if the linked page changes. – Gabriel Mar 5 at 22:16

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.