{"id":198,"date":"2016-08-09T06:27:01","date_gmt":"2016-08-09T06:27:01","guid":{"rendered":"http:\/\/www.3pixls.com\/blog\/?p=198"},"modified":"2016-08-09T06:27:50","modified_gmt":"2016-08-09T06:27:50","slug":"overwrite-the-howdy-message-in-admin-toolbar-wordpress","status":"publish","type":"post","link":"https:\/\/www.3pixls.com\/blog\/overwrite-the-howdy-message-in-admin-toolbar-wordpress\/","title":{"rendered":"Overwrite the \u201cHowdy\u201d Message in admin toolbar WordPress"},"content":{"rendered":"<p><img loading=\"lazy\" class=\"alignnone size-medium wp-image-199\" src=\"http:\/\/www.3pixls.com\/blog\/wp-content\/uploads\/2016\/08\/admintoolbar-300x100.jpg\" alt=\"admintoolbar\" width=\"300\" height=\"100\" srcset=\"https:\/\/www.3pixls.com\/blog\/wp-content\/uploads\/2016\/08\/admintoolbar-300x100.jpg 300w, https:\/\/www.3pixls.com\/blog\/wp-content\/uploads\/2016\/08\/admintoolbar.jpg 600w\" sizes=\"(max-width: 300px) 100vw, 300px\" \/><br \/>\nFirst, we want to overwrite the \u201cHowdy\u201d. Add these lines in the functions.php of your theme.<\/p>\n<p>[php]<br \/>\nfunction howdy_message($translated_text, $text, $domain) {<br \/>\n    $new_message = str_replace(&#8216;Howdy&#8217;, &#8216;Welcome&#8217;, $text);<br \/>\n    return $new_message;<br \/>\n}<br \/>\nadd_filter(&#8216;gettext&#8217;, &#8216;howdy_message&#8217;, 10, 3);<br \/>\n[\/php]<\/p>\n<p>The above function replaces the \u201cHowdy\u201d with \u201cWelcome\u201d using the PHP str_replace function and applies the function through the WordPress own gettext filter. Once added, refresh the WordPress Dashboard and the greeting should now say \u201cWelcome\u201d, as shown below.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>First, we want to overwrite the \u201cHowdy\u201d. Add these lines in the functions.php of your theme. [php] function howdy_message($translated_text, $text, $domain) { $new_message = str_replace(&#8216;Howdy&#8217;, &#8216;Welcome&#8217;, $text); return $new_message; } add_filter(&#8216;gettext&#8217;, &#8216;howdy_message&#8217;, 10, 3); [\/php] The above function replaces the \u201cHowdy\u201d with \u201cWelcome\u201d using the PHP str_replace function and applies the function through the WordPress [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":199,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":[],"categories":[8,9],"tags":[],"_links":{"self":[{"href":"https:\/\/www.3pixls.com\/blog\/wp-json\/wp\/v2\/posts\/198"}],"collection":[{"href":"https:\/\/www.3pixls.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.3pixls.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.3pixls.com\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.3pixls.com\/blog\/wp-json\/wp\/v2\/comments?post=198"}],"version-history":[{"count":1,"href":"https:\/\/www.3pixls.com\/blog\/wp-json\/wp\/v2\/posts\/198\/revisions"}],"predecessor-version":[{"id":200,"href":"https:\/\/www.3pixls.com\/blog\/wp-json\/wp\/v2\/posts\/198\/revisions\/200"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.3pixls.com\/blog\/wp-json\/wp\/v2\/media\/199"}],"wp:attachment":[{"href":"https:\/\/www.3pixls.com\/blog\/wp-json\/wp\/v2\/media?parent=198"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.3pixls.com\/blog\/wp-json\/wp\/v2\/categories?post=198"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.3pixls.com\/blog\/wp-json\/wp\/v2\/tags?post=198"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}