Change the Sidebar's Widget "Welcome" Greeting
-
I’m interested in trying to change the sidebar widget’s “Welcome” message to something of my choosing.
In a previous thread where I asked this question the plugin author gave instructions and a code. And it worked. However it also did this weird thing where it replaced the text for the “Logout” link in Theme My Login widget with the new “Welcome” message.
Listed below is the author’s code (that I was able to tweak a little bit so it would include the user’s name in the greeting, like it does in the original widget). However, I still can’t figure out how to stop it from changing the text of the “Logout” link to the new “Welcome” message.
Does anyone know how to change the text back to “Logout”? Or have a better way to change the “Welcome” greeting?
<?php function tml_title( $title, $action ) { if ( is_user_logged_in() ) $title = sprintf( __( 'Welcome,<br/>%s', 'theme-my-login' ), wp_get_current_user()->display_name ); return $title; } add_filter( 'tml_title', 'tml_title', 10, 2 );
- The topic ‘Change the Sidebar's Widget "Welcome" Greeting’ is closed to new replies.