8

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?

22
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.

0

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' )
  • 1
    This should be add_filter() - but the rest is good in terms of working out which page you're on. – Dan Smart Apr 11 '16 at 14:20
0

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)

-6

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.

  • 3
    This isn't a solution at all, because that file will be deleted during the next upgrade. You are just wasting your time. – fuxia Feb 6 '16 at 17:55

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.