How to edit title on Edit post pages?
-
21-04-2021 - |
Solución
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');
}
}
Licenciado bajo: CC-BY-SA con atribución
No afiliado a wordpress.stackexchange