Social Activity Shortcodes

Overview

Ultimate Member offers shortcodes for enhancing social interaction and activity tracking on your WordPress site. The Social Activity Shortcodes provide flexible options for displaying user wall posts, site-wide activities, and trending hashtags. Let's explore each shortcode's key features and use cases.

Shortcodes


[ultimatemember_wall] 

The [ultimatemember_wall] shortcode is designed for the user profile page, exclusively showcasing a user's wall posts. It does not display single posts or hashtags directly; instead, the hashtag link leads to the predefined Activity page. Additionally, the shortcode supports the display of the user's wall form.

Parameters (Attributes) Type Description
user_id integer Displays the wall of the selected user. It can be empty. Default: the requested profile ID or the current user ID on pages other than the Profile
loading "sync|async" Specifies how the first page of the activity wall is loaded.
Default: async = AJAX
    async initiating a separate AJAX request after the browser page has loaded.
    sync loads it together with the browser page.

Sample Usage:

[ultimatemember_wall user_id=”123” data-loading="async" /]

[ultimatemember_activity]

The [ultimatemember_activity] shortcode offers a comprehensive view of site-wide activities. Users can filter by hashtag or a specific wall post. This shortcode is ideal for creating an Activity page on your site. It includes hashtags and, as a separate feature, internally utilizes the [ultimatemember_activity_single_post] shortcode callback via $_GET['wall_post'].

Parameters ( attributes ) Type Description
wall_post integer Activity post ID, primarily for backward compatibility. By default, it uses the $_GET attribute for flexibility.
hashtag
string Hashtag name with or without #. Allows filtering by the hashtag.
loading 'sync|async' Determines how the activity wall is loaded 'sync' loads it together with the browser page, while 'async' initiates a separate AJAX request after the browser page has loaded. Default: async = AJAX
Internal Attributes Type Description
template="activity"
string activity template name
mode="activity"
string mode name append in the element’s class
form_id="um_activity_id"
string form id append in the element id

You can use the above attributes if you want to display the site's activity wall on the custom page or filter it by the hashtag.

Sample Usage:

[ultimatemember_activity /] - site-wide activity

[ultimatemember_activity hashtag="#ultimatemmembertalks"] - site-wide activity filtered by hashtag;

[ultimatemember_activity_single_post] 

The [ultimatemember_activity_single_post] shortcode is specifically for displaying a single wall post on a custom page.

Required Attribute Type Description
'wall_post' => '{int}' Activity post ID Required for displaying a single activity post on a custom page.


Trending Hashtags

[ultimatemember_trending_hashtags]

Shows the trending hashtags that the users used in their wall posts.

Parameters (attributes) Type Description
trending_days integer the number of days the hashtags trend
number string number of hashtags to trend in days

Sample Usage:

[ultimatemember_trending_hashtags trending_days=”7” number=”10” ]