Change page title in admin area

The question:

Is there someway to change the title in wp-admin? Been looking all over google but no one seem to mention it.

I simply want to get rid of “— WordPress” and possibly change the “‹” into some other symbol.

Any ideas?

The Solutions:

Below are the methods you can try. The first solution is probably the best. Try others if the first one doesn’t work. Senior developers aren’t just copying/pasting – they read the methods carefully & apply them wisely to each case.

Method 1

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

function my_admin_title($admin_title, $title)
{
    return get_bloginfo('name').' • '.$title;
}

You could also do a str_replace on $admin_title to remove “— WordPress” and change “‹”.

Look at the top of the wp-admin/admin-header.php file to see what is going on by default.

Method 2

Here’s how we’ve done it, in order to change only a specific custom post type:

/* edit the admin page title for a particular custom post type */
function edit_page_title() {
    global $post, $title, $action, $current_screen;
    if( isset( $current_screen->post_type ) && $current_screen->post_type == 'CUSTOM-POST-TYPE' && $action == 'edit' ) {
        /* this is the new page title */
        $title = 'Change to whatever you want: ' . $post->post_title;           
    } else {
        $title = $title .' - ' .get_bloginfo('name');
    }
    return $title;  
}

add_action( 'admin_title', 'edit_page_title' )

Method 3

This is more important than the basic purpose.

In fact for “edit page” the default admin_title is

get_bloginfo('name')."---Wordpress"

This is awful for who edits several pages or articles at same time.
I have added the page title and the ID to avoid confusions.

Note: currently it is very difficult to find the solution if you have not the keyword “admin_title”. Keywords like “WordPress admin document title” do not give quick results. I found the current thread very far into Google (same as WordPress search). I need four hours for an operational work of a few minutes to add a personalized filter into the child theme (functions.php)

Method 4

All those answers above are unnecessarily complicated. I am a newbie and I found this out by experimentation.

$admin_title holds the title in admin-header.php, so simply remove — WordPress from line 43-47 to remove “— WordPress” from the title. Play around in those lines to manipulate the title.


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

Leave a Comment