Quantcast
Channel: CalendarScripts | CalendarScripts Blog
Viewing all articles
Browse latest Browse all 215

User Info Shortcodes from WatuPRO Version 4.1.1

$
0
0

From WatuPRO version 4.1.1 and above you no longer need additional plugins to display data from user profile of the logged in user. WatuPRO defines own shortcodes that are super easy to use. Here is what you need:

[watupro-userinfo profile_field] where “profile field” is the field from the user profile you want to display. For example:

[watupro-userinfo display_name] will display the user display name

[watupro-userinfo first_name] and [watupro-userinfo last_name] will display respectively the first and last name and so on. The full list of default user fields is here:

ID
user_login
user_pass
user_nicename
user_email
user_url
user_registered
display_name

But this is not all. You can also display ANY value from the user_meta table as long as you know the key, even if it’s created by another plugin. For example [watupro-userinfo namaste_points] will display the points collected in Namaste! LMS and so on.

Showing Defaults (and handling non-logged in users)

You can prepare a default value to be shown if the user is not logged in, or simply if the value is empty. You just need to pass the default as second argument to the shortcode. Here is example:

Hello [watupro-userinfo first_name "Friend"]!

That’s it. Use the new shortcodes in the final screen, in certificates, in the email contents, anywhere. You can use them even in areas outside of WatuPRO – for example in post or pages, in the sidebar, etc.


Viewing all articles
Browse latest Browse all 215

Trending Articles