Czy chcesz zmienić lub usuwać powitanie „Howdy” na pasku administratora WordPress?
Wiele osób nigdy nie używa słowa „cześć” w prawdziwym życiu. Warto zmienić je na powitanie, które brzmi bardziej znajomo. Może chcesz upewnić się, że tłumaczenie witryny nie robi nic złego lub po prostu mieć bardziej profesjonalne powitanie.
W tym artykule pokażemy, jak zmienić lub usuwać „Howdy Admin” za pomocą 3 prostych rozwiązań.
Dlaczego warto zmieniać lub usuwać „Howdy Admin”?
Za każdym razem, gdy użytkownik loguje się do kokpitu swojej witryny internetowej WordPress, jest witany słowem „Howdy”, po którym następuje jego nazwa wyświetlana.
Na przykład, jeśli zaloguje się John Smith, to w prawym górnym rogu ekranu zobaczy napis „Howdy, John Smith”.
To powitanie może nie brzmieć naturalnie dla niektórych użytkowników. „Howdy” to skrót od „How do you do?”, ale wiele osób mówiących po angielsku nigdy nie używa tego słowa. Może to brzmieć nie na miejscu, nieaktualne, a nawet nieco irytujące.
Niektóre osoby niebędące rodzimymi użytkownikami języka angielskiego mogły nawet nigdy nie zetknąć się z taksonomią.
Na szczęście można zmienić powitanie na coś, co brzmi bardziej znajomo, jak Welcome, Hello, Hey lub Hi. Możesz także całkowicie je pominąć, aby zobaczyć tylko wyświetlaną nazwę użytkownika.
Zmiana lub usuwanie „Howdy Admin” jest bardzo proste, więc możesz obejrzeć poniższy film lub przewinąć w dół, jeśli wolisz instrukcje pisemne.
Film instruktażowy
Zmiana lub usuwanie „Howdy Admin” przy użyciu WPCode (zalecane)
Możesz zmienić lub usuwać „Howdy Admin” bez użycia wtyczki, dodając własny fragment kodu do pliku functions.php twojego motywu.
Nie zalecamy edytowania plików PHP twojego motywu niedoświadczonym użytkownikom, ponieważ nawet mały błąd może spowodować uszkodzenie witryny internetowej.
Aby upewnić się, że tak się nie stanie, możesz użyć WPCode, aby zmienić lub usuwać „Howdy Admin” z twojej witryny. WPCode jest nie tylko najpotężniejszą wtyczką do fragmentów kodu dostępną dla WordPressa, ale także zawiera ogromną bibliotekę gotowych fragmentów kodu.
Zanim zaczniesz, musisz pobrać i zainstalować darmową wtyczkę WPCode. Aby uzyskać więcej informacji, zobacz nasz przewodnik krok po kroku, jak zainstalować wtyczkę WordPress.
Po włączaniu wystarczy udać się do Code Snippets ” Library i wpisać „howdy” w pasku wyszukiwania. W rezultacie pojawi się gotowy fragment kodu o nazwie „Change Howdy Admin in Admin Bar”.
Wystarczy najechać kursorem na fragment kodu i kliknąć „Użyj fragmentu kodu”, aby dodać go do twojej witryny.
Następnie zostaniesz przeniesiony na stronę „Edytuj fragment kodu”. Ponieważ używasz fragmentu kodu z biblioteki WPCode, wszystkie opcje i ustawienia są wypełnione za Ciebie.
Wszystko, co musisz zrobić, to kliknąć przełącznik na „Włączanie”, a następnie nacisnąć przycisk „Aktualizuj”. Natychmiast zobaczysz zmianę w prawym górnym rogu ekranu, gdzie „Howdy Admin” zmieniło się na „Welcome Admin”.
Aby dostosować powitanie, po prostu zmień słowo w pojedynczym cudzysłowie z „Howdy” na dowolne inne. Na przykład, możesz zmienić $new_howdy
= ” Witaj,"
; na $new_howdy = "Cześć,";
aby zmienić wiadomość na „Cześć, administratorze”.
Możesz również całkowicie usuwać powitanie, co spowoduje wyświetlenie tylko nazwy użytkownika w rogu. Aby to zrobić, usuń wszystko między pojedynczymi cudzysłowami, aby linia brzmiała po prostu $new_howdy = '';
.
Jeśli chcesz powrócić do powitania „Cześć”, po prostu przełącz przełącznik z powrotem na „Nieaktywny” i ponownie kliknij „Aktualizuj”. Spowoduje to, że fragment kodu WPCode przestanie działać, ale będzie można go ponownie aktywować w dowolnym momencie.
Mamy nadzieję, że ten artykuł pomógł ci dowiedzieć się, jak dostosować powitanie w zapleczu WordPress. Następnie zapoznaj się z naszym przewodnikiem na temat wyboru najlepszego hostingu WordPress lub sprawdź naszą listę niezbędnych wtyczek WordPress, aby rozwinąć twoją witrynę internetową.
If you liked this article, then please subscribe to our YouTube Channel for WordPress video tutorials. You can also find us on Twitter and Facebook.
Syed Balkhi says
Hey WPBeginner readers,
Did you know you can win exciting prizes by commenting on WPBeginner?
Every month, our top blog commenters will win HUGE rewards, including premium WordPress plugin licenses and cash prizes.
You can get more details about the contest from here.
Start sharing your thoughts below to stand a chance to win!
Moinuddin Waheed says
Thanks for this guide on removing howdy message from the dashboard.
I had to handover the dashboard to my client and I thought of changing this message because he may not be aware of hwody message.
So, I wanted to create personalised greeting.
However, It never felt alien to me to use howdy.
WPBeginner Support says
You’re welcome
Administrator
Jiří Vaněk says
Before reading this article, as a non-native speaker, even though I speak English relatively well, it never occurred to me what the word 'howdy’ actually means. And that’s while I use WordPress on a daily basis.
Jen says
Thank you so much! Worked like a charm!
WPBeginner Support says
You’re welcome
Administrator
Luvuyo Wati says
Worked, thank you.
WPBeginner Support says
You’re welcome
Administrator
Hadi El Jundi says
Works like a charm! Many thanks, my friend!
Noah Pascua says
Thank you. It works on mine.
simon says
hello can anyone help me?
I want to translate a string in wordpress theme
//
if($mt_o[’mt_rewrite_doctor_name’]!=””) { $mt_cpt_doctors_name = $mt_o[’mt_rewrite_doctor_name’]; } else { $mt_cpt_doctors_name = „Staff'”;}
//
i translated such :
if($mt_o[’mt_rewrite_doctor_name’]!=””) { $mt_cpt_doctors_name = $mt_o[’mt_rewrite_doctor_name’]; } else { $mt_cpt_doctors_name = __(’Staff’,’madza_translate’);}
but it does not work!!!!
can you guy help me ? plz plz
Ast says
It doesnt work,,, after I use this code, wordpress (Version 4.2.2) admin panel cant load,, should remove this code..
David Labbe says
There is a much easier way to do this by using the old menu node values:
function np_replace_howdy($wp_admin_bar){
//New text to replace Howdy
$new_text = 'Welcome’;
//Call up the 'my-account’ menu node for current values.
$my_account = $wp_admin_bar->get_node(’my-account’);
//Replace the 'Howdy’ with new text with string replace
$new_title = str_replace(’Howdy’, $new_text, $my_account->title);
//Rebuild the menu using the old node values and the new title.
$wp_admin_bar->add_menu(array(
'id’ => $my_account->id,
'parent’ => $my_account->parent,
'title’ => $new_title,
'href’ => $my_account->href,
'group’ => $my_account->group,
'meta’ => array(
'class’ => $my_account->meta[’class’],
'title’ => $my_account->meta[’title’],
),
));
}
add_action(’admin_bar_menu’, 'np_replace_howdy’, 999);
See my gist:
https://gist.github.com/Davidlab/8460a3cec27cb585d95c
pushker says
it is not woprking in my code . please suggest some easy code to remove howdy with hello
Gauranga says
I tried but it didn’t work.. kept saying error and when tried to repair it, my WordPress admin panel couldn’t load any more I had to switch back to my back up functions.php file (fortunately i had it). Perhaps i made a mistake but it would be nice to have something that is really copy and paste for neophytes like myself with clear instructions instead of expecting everyone to know something else that may be common sense for those who know codes. Gauranga.
Sanskar says
Can we make it change each time to say hello in different languages?
WPBeginner Support says
Yes, you can. It may be a little complicated but do able. You will need to create an array in PHP with greetings in different languages. Then randomly pick a string from the array and use it with the rest of the code above.
Administrator
NATHAN says
Wow…! Thank you genius..,
Lee says
Perfect! Thank you.
iTechRevo says
Hey in the admin panel howdy can be edited but on the front end howdy is still there and cannot be changed so what should i do to edit it?
graphicagenda says
@senlinonline: That is a great snippet! but it reverts back to the howdy for the frontend admin bar while logged in.
senlinonline says
Changing „Howdy” can actually be done quite a bit simpler than the above code. Add this to your functions.php (or functionality.php or any other file): /** CHANGE HOWDY – http://wpmu.org/daily-tip-how-to-change-the-wordpress-howdy-message-to-a-custom-welcome/ **/add_filter(’gettext’, 'change_howdy’, 10, 3);function change_howdy($translated, $text, $domain) { if (!is_admin() || 'default’ != $domain) return $translated; if (false !== strpos($translated, 'Howdy’)) return str_replace(’Howdy’, 'Welcome back’, $translated); return $translated;}/** END CHANGE HOWDY **/
Sean 'Wordpress Guy' Vosler says
I know, actually had a client ask me if it was made by a southern company because when I was signed it in said 'howdy’, had a good laugh, but def something to do if your not positive on how a client might react
WPBeginner - WordPress for Beginners says
Sean 'Wordpress Guy’ Vosler for the sake of customization? Not everyone thinks that Howdy is cool. Greg said he will be sending us a more detailed tutorial on how he added more links and such.
timgordons says
Cool Tutorial. Just love it. Thanks! for this
Maximiliano Noriega says
Wow, great tip
Sean 'Wordpress Guy' Vosler says
why would you want to change this??? :p