Getting Started with: Shortcodes

IMPORTANT NOTE: This article is only for WP Ultimo version 1.x users

WP Ultimo offers some handy shortcodes to be used on your network’s front-end. Here is a list containing all of them and how to use them.

Restricted Content

Since version 1.5.0 admins can use the Restrict Content shortcode to add content to the main site directed to subscribers only. It takes the following form:

<code>[wu_restricted_content plan_id="all" only_active=0] <br><br>Restricted Content<br><br>[wu_default_content]<br><br>Default content displayed to non-subscribers<br><br>[/wu_restricted_content]

The plan_id argument takes a list of plan ids separated by commas, or the word all to allow every plan.

The only_active argument, if set to 0, only displays the restricted content to active subscription. If that attribute is omitted, all the content will be displayed to all users with subscriptions, active or not.

You can also use the only_logged argument, to decide if the restriction should be applied based on the current site subscription status. If set to 1, it will use the current user’s account to determine if the content should be displayed or not.

Pricing Tables

To display our pricing tables you can use the shortcode [wu_pricing_table]. That will include the pricing tables with the select button for each plan. Clicking on the select button will then start the sign-up process, skipping the plan selection step.

Template List

This handy shortcode [wu_templates_list] can be used to display the Template List on the front-end of your site. You can also hide the filter using the argument show_filters="0". You can also select which templates you want to display using the parameter templates="1,2,3", where 1, 2, and 3 are IDs of Site Templates.

If you need to generate a URL that starts the sign-up process directly from a specific plan and frequency, you should use the shortcode [wu_plan_link]. It takes two arguments, plan_id and plan_freq. Use the plan id on the URL of the edit page of the plan you want to generate the URL. For the plan_freq, you can use 1 for monthly, 3 for quarterly, and 12 for yearly billing. The final shortcode will look something like [wu_plan_link plan_id="70" plan_freq="1"].

Paying Users

[wu_paying_users] is a simple shortcode that just displays the number of paying users on your network. Useful for adding some statistics on your home page to help convert potential subscribers!

User Meta

WP Ultimo also exposes a shortcode to display user meta information on the front-end: [wu_user_meta]. It takes a user_id argument (which you can leave blank as it defaults to the current site’s owner id) and meta_name, which describes the name of the meta info you want to retrieve. To get the user’s last name, for example, you would simply add a [wu_user_meta meta_name="last_name"]. This is how you would display some info gathered during a sign-up flow with custom fields.

Did this answer your question? Thanks for the feedback There was a problem submitting your feedback. Please try again later.