Skip to content

This shortcode provide an alternative to those who don't want to write php code to display specific user's avatar, by a simple shortcode [user-avatar]

License

Notifications You must be signed in to change notification settings

michaeledi/Display-wordpress-user-avatar-by-user-id-with-shortcode

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 

Repository files navigation

Display-wordpress-user-avatar-by-user-id-with-shortcode

This shortcode is a quite raw,simple but useful one to me. Allowing you to display a specific user's avatar by setting the user id in the shortcode [avatar id="xxx"].

Usage:

  1. Paste the code without "" to the theme's function.php;

  2. Add shortcode in your wordpress editor in the form like this: [avatar id="#replace the user_id here(e.g:121)#"]

I could have add more attributes to the shortcode, but I want to keep it simple, so if there is more attr that you want, you can add them by edit the php code.

About

This shortcode provide an alternative to those who don't want to write php code to display specific user's avatar, by a simple shortcode [user-avatar]

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages