Change howdy text from wordpress admin bar

WordPress shows a default Howdy text in Admin bar. When you login in your admin area you will notice a Howdy text in top right corner area. Today I’ll show you how can you change the Howdy text by code. Given code will change your Howdy text to Welcome. You can change the text whatever you like.

NB : Please keep a backup your function.php before any changes.

Follow the steps:

  1. Open your function.php file .
  2. Paste the code at the bottom of the file before ?> sign.

function replace_howdy( $wp_admin_bar ) {
$newtitle = str_replace( 'Howdy,', 'Welcome,', $my_account->title );
$wp_admin_bar->add_node( array(
'id' => 'my-account',
'title' => $newtitle,
) );
add_filter( 'admin_bar_menu', 'replace_howdy',25 );

  1. Save the file.


Howdy text change

Tags : , , , , , , , ,

Share on :

Leave a Reply

× nine = 54