Title: shortcode / username greeting
Last modified: August 21, 2016

---

# shortcode / username greeting

 *  [knoxhomesandrealty](https://wordpress.org/support/users/knoxhomesandrealty/)
 * (@knoxhomesandrealty)
 * [12 years, 8 months ago](https://wordpress.org/support/topic/shortcode-username-greeting/)
 * what is the short code I can use to display to welcome the user when he/she logs
   on? Like if I want to do something like this…
 * “Hello [username_shortcode], welcome to our site”
 * [http://wordpress.org/plugins/wordpress-social-login/](http://wordpress.org/plugins/wordpress-social-login/)

Viewing 5 replies - 1 through 5 (of 5 total)

 *  [Mel](https://wordpress.org/support/users/acvic/)
 * (@acvic)
 * [12 years, 8 months ago](https://wordpress.org/support/topic/shortcode-username-greeting/#post-4026217)
 * Add this to the end of wsl.auth.widget.php
 *     ```
       // --------------------------------------------------------------------
   
       function wsl_get_username(){
   
       	global $current_user;
   
       		get_currentuserinfo();
   
       		$user_id = $current_user->ID;
   
       	$display_wsl_username = wsl_get_user_data_by_user_id( "display_name", $user_id );
   
       	return $display_wsl_username;
   
       	 }
   
       add_shortcode ( 'wsl_username', 'wsl_get_username' );
       ```
   
 * And add `[wsl_username] is cool`
 *  Thread Starter [knoxhomesandrealty](https://wordpress.org/support/users/knoxhomesandrealty/)
 * (@knoxhomesandrealty)
 * [12 years, 8 months ago](https://wordpress.org/support/topic/shortcode-username-greeting/#post-4026236)
 * Hey thank you for your help, but I can’t find that file anywhere when I’m in 
   the edit section of WordPress-Social-Login? There are only 5 *.php files:
    wordpress-
   social-login/wp-social-login.php wordpress-social-login/hybridauth/index.php 
   wordpress-social-login/services/siteinfo.php wordpress-social-login/services/
   diagnostics.php wordpress-social-login/services/index.php
 * Am I looking in the wrong dir/ ?
 *  [Mel](https://wordpress.org/support/users/acvic/)
 * (@acvic)
 * [12 years, 8 months ago](https://wordpress.org/support/topic/shortcode-username-greeting/#post-4026289)
 * [https://github.com/hybridauth/WordPress-Social-Login/blob/master/includes/widgets/wsl.auth.widget.php](https://github.com/hybridauth/WordPress-Social-Login/blob/master/includes/widgets/wsl.auth.widget.php)
 * /includes/widgets/wsl.auth.widget.php
 *  Thread Starter [knoxhomesandrealty](https://wordpress.org/support/users/knoxhomesandrealty/)
 * (@knoxhomesandrealty)
 * [12 years, 8 months ago](https://wordpress.org/support/topic/shortcode-username-greeting/#post-4026290)
 * Thank you for your help Mel, and thanks for your quick response. I figured it
   out and that worked great!
 * How would I be able to get their FB (or any social site) avatar to show as well
   when they are logged in?
 *  [Mel](https://wordpress.org/support/users/acvic/)
 * (@acvic)
 * [12 years, 8 months ago](https://wordpress.org/support/topic/shortcode-username-greeting/#post-4026326)
 * add that on WSLs options page
    wp-admin/options-general.php?page=wordpress-social-
   login&wslp=login-widget Basic > User Avatars > “Display user avatars from social
   networks when available”

Viewing 5 replies - 1 through 5 (of 5 total)

The topic ‘shortcode / username greeting’ is closed to new replies.

 * ![](https://s.w.org/plugins/geopattern-icon/wordpress-social-login_a1a2bc.svg)
 * [WordPress Social Login](https://wordpress.org/plugins/wordpress-social-login/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/wordpress-social-login/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/wordpress-social-login/)
 * [Active Topics](https://wordpress.org/support/plugin/wordpress-social-login/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/wordpress-social-login/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/wordpress-social-login/reviews/)

 * 5 replies
 * 2 participants
 * Last reply from: [Mel](https://wordpress.org/support/users/acvic/)
 * Last activity: [12 years, 8 months ago](https://wordpress.org/support/topic/shortcode-username-greeting/#post-4026326)
 * Status: not resolved