Front-end Membership Modules

Home / User Info Shortcode

User Info Shortcode

If you would like to personalise content on a page, post or sidebar text widget, you can use this shortcode to display user data for the current logged in user.

Let’s say we want to display a call to action message in a sidebar text widget. You can do so by adding the following content in the text widget.

Welcome [cjfm_user_meta meta_key="display_name"], You can now get 10% discount on all our products.

[cjfm_user_meta meta_key=”display_name”] will be replaced by the actual display name of the current loggedin user.

Shortcode Parameters:

Select the user data key from the dropdown.

Using Shortcode Generator

You can use our Shortcode Generator to easily specify parameters and insert this shortcode on any page while editing a page or post.



Using user info shortcode in template files

If you are a developer or creating your own WordPress theme, you can call this shortcode via following PHP function: