admin管理员组

文章数量:1122846

Generally on our WordPress blogs, there is a label WordPress displayed in the title bar. Does anybody have an idea on how to hide or remove it?

My website is powered by WordPress multisite installation and like many people I wanted it as self-branded even though I keep a link back to wordpress in the footer.

Is it inappropriate to do this?

Generally on our WordPress blogs, there is a label WordPress displayed in the title bar. Does anybody have an idea on how to hide or remove it?

My website is powered by WordPress multisite installation and like many people I wanted it as self-branded even though I keep a link back to wordpress.org in the footer.

Is it inappropriate to do this?

Share Improve this question edited Jun 26, 2016 at 7:05 Dmitry Mayorov 3511 silver badge10 bronze badges asked Dec 10, 2010 at 15:33 user391user391 5393 gold badges13 silver badges25 bronze badges 2
  • 1 Are you talking about in the admin? Or on the front-end of the website? – TheDeadMedic Commented Dec 10, 2010 at 15:34
  • Yes ! On Dashboard . When a user log in to Dashboard ,it appears – user391 Commented Dec 11, 2010 at 5:34
Add a comment  | 

9 Answers 9

Reset to default -2

Edit: You should not do this, back in the time when I answered this, I didn't know better. Check this answer instead.


I personaly don't think you should really do this, and I would leave it there if I were you - it is in fact a way to support WordPress, and don't forget you got it for free. ;)

but, if you really want to do it, go to /wp-admin/admin-header.php

and remove — WordPress from this line:

<title><?php echo $title; ?> &lsaquo; <?php bloginfo('name') ?>  &#8212; WordPress</title>

You're so ashamed to be using WordPress? :-)


There's a filter in WP 3.1:

$admin_title = apply_filters( 'admin_title', $admin_title, $title );

This should do the trick for you but first you must create a child theme of your main theme. Then create functions.php file in the child theme and paste this code and you are good to go.

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

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

Best I can tell, by default Wordpress displays the Blog Title (Settings->General). Have you changed that to something besides the default?

function custom_admin_title( $admin_title ) {
    return str_replace( ' &#8212; WordPress', '', $admin_title );
}

add_filter( 'admin_title', 'custom_admin_title' );

Is it inappropriate to do this ?

No, your looking at the meta title tag, the easiest solution to change this is with an SEO plugin that can alter the meta title tags dynamically or manually. All of the top SEO plugins have this functionality.

If Settings->General didn't work better login into database (through control panel or http://website_name.com/phpmyadmin) search for wp-optionsand change blogname.

You should try this one

  1. Hide "-WordPress" text in log in page title
// Put this in your functions.php file
function custom_login_title( $login_title ) {
return str_replace(array( ' &lsaquo;', ' &#8212; WordPress'), array( ' &lsaquo;', ''),$login_title );
}
add_filter( 'login_title', 'custom_login_title' );
  1. Hide "-WordPress" text in Admin page title
// Put this in your functions.php file
function custom_admin_title( $admin_title ) {
return str_replace(array( ' &lsaquo;', ' &#8212; WordPress'), array( ' &lsaquo;', ''),$admin_title );
}
add_filter( 'admin_title', 'custom_admin_title' );

Go to wp-admin/admin-header.php. There you will find this code maybe on line 37 to 53.

You can find the keyword "WordPress". Use CTRL+F to find the keyword and manually replace it with something that matches your brand name.

if ( is_network_admin() ) {
    /* translators: Network admin screen title. %s: Network title. */
    $admin_title = sprintf( __( 'Network Admin: %s' ), esc_html( get_network()->site_name ) );
} elseif ( is_user_admin() ) {
    /* translators: User dashboard screen title. %s: Network title. */
    $admin_title = sprintf( __( 'User Dashboard: %s' ), esc_html( get_network()->site_name ) );
} else {
    $admin_title = get_bloginfo( 'name' );
}

if ( $admin_title == $title ) {
    /* translators: Admin screen title. %s: Admin screen name. */
    $admin_title = sprintf( __( '%s &#8212; WordPress' ), $title );
} else {
    /* translators: Admin screen title. 1: Admin screen name, 2: Network or site name. */
    $admin_title = sprintf( __( '%1$s &lsaquo; %2$s &#8212; WordPress' ), $title, $admin_title );
}

本文标签: customizationRemoving label 39WordPress39 from the title bar