The <title> tag in pages for post edit is Edit Post < Site name — WordPress. I want to change it to Edit Post < Site name – The title of the post in editing. Is this possible? Where can I locate the header of this page? Apparently it cannot be in the theme.
Answers:
Thank you for visiting the Q&A section on Magenaut. Please note that all the answers may not help you solve the issue immediately. So please treat them as advisements. If you found the post helpful (or not), leave a comment & I’ll get back to you as soon as possible.
Method 1
Add this code instead on your functions.php, this will change the post and product title to the post or product that is being edit:
add_filter('admin_title', 'my_admin_title', 10, 2);
function my_admin_title($admin_title, $title)
{
global $post, $action;
if ( isset($post->post_title) and $action == 'edit' ){
return 'Edit < '.$post->post_title.' - '.get_bloginfo('name');
} else {
return $title .' - ' .get_bloginfo('name');
}
}
All methods was sourced from stackoverflow.com or stackexchange.com, is licensed under cc by-sa 2.5, cc by-sa 3.0 and cc by-sa 4.0
