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.

2 Answers 2


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.


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


  • 1
    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, 2016 at 22:16
  • @Gabriel was correct, the linked page has changed and this answer is now worthless.
    – glenatron
    Nov 4, 2022 at 12:15
  • The mistakes a young apprentice made. Learned the lesson :) Nov 8, 2022 at 9:26

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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