WordPress should work how you want it to. There are hundreds, if not thousands of plugins out there to help you get WordPress working how you want. However, one thing has long bothered me, and that’s the “Howdy,” in the top right of the admin panel. Call me crazy, but I’ve never like the Howdy part. Since WordPress is so versatile, I set out to find a way to change that text to something more professional, like “Welcome back,”. Below is a short piece of code that you can paste into your theme’s function file that will allow you to do just that:
UPDATED! Since first publishing this, I have found a faster, easier way to replace the Howdy text. I’m including both methods here for archival purposes:
/***************************************************** REPLACE HOWDY This function replaces the "Howdy" text next to a user with a more professional "Welcome Back, " *********************************************************** function change_howdy($translated, $text, $domain) { if (false !== strpos($translated, 'Howdy')) return str_replace('Howdy', 'Welcome Back', $translated); return $translated; } add_filter('gettext', 'change_howdy', 10, 3);
Old way to replace text:
/**REPLACE HOWDY**/ // Customize: $nohowdy = "Welcome Back"; // Hook in if (is_admin()) { add_action('init', 'ozh_nohowdy_h'); add_action('admin_footer', 'ozh_nohowdy_f'); } // Load jQuery function ozh_nohowdy_h() { wp_enqueue_script('jquery'); } // Modify function ozh_nohowdy_f() { global $nohowdy; //echo <<<JS ?> <script type="text/javascript"> //<![CDATA[ var nohowdy = "<?php echo $nohowdy; ?>"; jQuery('#user_info .hide-if-no-js') .html( jQuery('#user_info .hide-if-no-js') .html() .replace(/Howdy/,nohowdy) ); //]]> </script> <?php //JS; } /**END REPLACE HOWDY**/
With that little piece of code, you can say goodbye to “Howdy”. Please note that this works with the WP 3.2 and greater.
Leave a Reply