I would like to replace the WordPress word in title of Dashboard.

enter image description here

Original title:

Dashboard < Site Title - WordPress

Expected result:

Dashboard < Site Title - foobar

I tried to do this with this below code, but it doesn't do what I expected.

add_filter('admin_title', 'my_admin_title', 10, 2);
function my_admin_title($admin_title, $title)
        return get_bloginfo('name').' &bull; '.$title;

You've tried correct filter - just needs to update return:

function my_admin_title ( $admin_title, $title ) {
    return $title . ' ‹ ' . get_bloginfo( 'name' ) . ' — ' . 'foobar';
add_filter( 'admin_title', 'my_admin_title', 10, 2 );

Btw, filter above works only for logged pages, for login page needs to add another filter:

add_filter( 'login_title', 'my_admin_title', 10, 2 );

If you're talking about this area

!Wordpress Title]1


Wordpress Title Setting

You should not have to insert in PHP

  • This is not what I'm looking for. – Feriman Nov 16 '19 at 11:54

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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