Home » Labs » How to Replace Howdy Text in WordPress 3.3 Admin Bar  

How to Replace Howdy Text in WordPress 3.3 Admin Bar


Filed under Labs

Here is a piece of WordPress code which allows you to change/remove “Howdy Text” in admin bar. For doing this you need to copy and paste the following piece of code to your functions.php

<?php
// replace WordPress Howdy in WordPress 3.3
function replace_howdy( $wp_admin_bar ) {
    $my_account=$wp_admin_bar->get_node('my-account');
    $newtitle = str_replace( 'Howdy,', 'Logged in as', $my_account->title );            
    $wp_admin_bar->add_node( array(
        'id' => 'my-account',
        'title' => $newtitle,
    ) );
}
add_filter( 'admin_bar_menu', 'replace_howdy',25 );
?>

Posts you may like: