Groups shortcodes
Overview
This document provides instructions on how to use shortcodes of the extension Groups.
Ultimate Member uses WordPress shortcodes to allow users to perform certain actions as well as display forms and templates. You may use shortcodes in the posts(page) content and text widgets.
Contents
[ultimatemember_groups] - Show "Groups" page
[ultimatemember_my_groups] - Show current user groups
[ultimatemember_groups_profile_list] - Show profile user groups
[ultimatemember_group_single] - Show single group page
[ultimatemember_group_discussion_activity] - Show Discussion
[ultimatemember_group_discussion_wall] - Show Discussion Wall
[ultimatemember_group_invite_list] - Show group Invite List
[ultimatemember_group_members] - Show a list of the group members
[ultimatemember_group_new] - Show a form to create or edit group
[ultimatemember_group_comments] - Show a block, that contains posts with the latest comments
Shortcodes
[ultimatemember_groups] #
This shortcode shows all groups with a search and filters. This is the default content for the Groups page.
Attributes
Key | Type | Default | Description |
avatar_size | string | 'default' | Group image size. |
category | integer | 0 | You can get the the category ID from the URL of the page "Edit Group Category". It is the parameter "tag_ID". |
groups_per_page | integer | 10 | A number of posts displayed and loaded at once on the desktop device. |
groups_per_page_mobile | integer | 10 | A number of posts displayed and loaded at once on the mobile device. |
privacy | string | 'all' | Restrict posts to show. |
show_actions | bool | 1 | Turn on/off actions menu. |
show_author | bool | 0 | Turn on/off an author. |
show_pagination | bool | 1 | Turn on/off pagination. |
show_search_form | bool | 1 | Turn on/off searching. |
show_search_categories | bool | 1 | Turn on/off searching by a category. |
show_search_tags | bool | 1 | Turn on/off searching by a tag. |
show_total_groups_count | bool | 1 | Turn on/off a counter. |
show_with_greater_than | integer | 0 | |
show_with_less_than | integer | 0 | |
sort | string | 'newest_groups' | Sorting. Options: 'date_asc', 'date_desc', 'title_asc', 'title_desc', 'members_asc', 'members_desc', 'activity_asc', 'activity_desc'. |
Example - Display groups for a particular category.
[ultimatemember_groups category="55" show_search_categories="0"]
Example - Display all groups.
[ultimatemember_groups]
[ultimatemember_my_groups] #
This shortcode shows groups a current user joined. This is the default content for the My Groups page.
Attributes
Key | Type | Default | Description |
avatar_size | string | 'default' | Group image size. |
category | integer | 0 | You can get the the category ID from the URL of the page "Edit Group Category". It is the parameter "tag_ID". |
groups_per_page | integer | 10 | A number of posts displayed and loaded at once on the desktop device. |
groups_per_page_mobile | integer | 10 | A number of posts displayed and loaded at once on the mobile device. |
own_groups | integer | 1 | Show only own groups. |
privacy | string | 'all' | Restrict posts to show. |
show_actions | bool | 1 | Turn on/off actions menu. |
show_pagination | bool | 1 | Turn on/off pagination. |
show_search_form | bool | 1 | Turn on/off searching. |
show_search_categories | bool | 1 | Turn on/off searching by a category. |
show_search_tags | bool | 1 | Turn on/off searching by a tag. |
show_total_groups_count | bool | 1 | Turn on/off a counter. |
show_with_greater_than | integer | 0 | |
show_with_less_than | integer | 0 | |
sort | string | 'newest_groups' | Sorting. Options: 'date_asc', 'date_desc', 'title_asc', 'title_desc', 'members_asc', 'members_desc', 'activity_asc', 'activity_desc'. |
Example - Display your groups.
[ultimatemember_my_groups]
[ultimatemember_groups_profile_list] #
This shortcode shows groups a current user joined or invited. This is the default content for the Groups profile tab.
Attributes
Key | Type | Default | Description |
avatar_size | string | 'default' | Group image size. |
category | integer | 0 | You can get the the category ID from the URL of the page "Edit Group Category". It is the parameter "tag_ID". |
groups_per_page | integer | 10 | A number of posts displayed and loaded at once on the desktop device. |
groups_per_page_mobile | integer | 10 | A number of posts displayed and loaded at once on the mobile device. |
own_groups | string | '' | Show only own groups. |
privacy | string | 'all' | Restrict posts to show. |
show_actions | bool | 1 | Turn on/off actions menu. |
show_pagination | bool | 1 | Turn on/off pagination. |
show_search_form | bool | 1 | Turn on/off searching. |
show_search_categories | bool | 1 | Turn on/off searching by a category. |
show_search_tags | bool | 1 | Turn on/off searching by a tag. |
show_total_groups_count | bool | 0 | Turn on/off a counter. |
show_with_greater_than | integer | 0 | |
show_with_less_than | integer | 0 | |
sort | string | 'newest_groups' | Sorting. Options: 'date_asc', 'date_desc', 'title_asc', 'title_desc', 'members_asc', 'members_desc', 'activity_asc', 'activity_desc'. |
Example - Display your groups and groups you are invited to.
[ultimatemember_groups_profile_list]
[ultimatemember_group_single] #
This shortcode shows a single group page. This is the default content for the Group page.
Attributes
Key | Type | Default | Description |
group_id | integer | current group ID OR 0 | The group ID |
avatar_size | string | '' | Group image size. |
show_actions | bool | 1 | Turn on/off actions menu. |
show_author |
bool | 1 | Turn on/off an author. |
Example - Display a group.
[ultimatemember_group_single group_id="309"]
[ultimatemember_group_discussion_activity] #
This shortcode shows a single group discussion - posts and comments.
Attributes
Key | Type | Default | Description |
group_id | integer | current group ID OR 0 | The group ID |
user_id | integer | current user ID | The user ID |
hashtag | string | 'hashtag' request parameter or empty | The hashtag |
wall_post |
integer | 'group_post' request parameter or empty | The post ID |
template | string | 'activity' | |
mode | string | 'activity' | |
form_id | string | 'um_group_id' | |
user_wall | integer | 0 |
Example - Display a group discussion.
[ultimatemember_group_discussion_activity group_id="309"]
[ultimatemember_group_discussion_wall] #
This shortcode shows a group discussion wall - posts and comments.
Attributes
Key | Type | Default | Description |
group_id | integer | current group ID OR 0 | The group ID |
user_id | integer | current user ID | The user ID |
hashtag | string | 'hashtag' request parameter or empty | The hashtag |
wall_post | integer | 'group_post' request parameter or empty | The post ID |
user_wall | integer | 1 |
Example - Display a group discussion.
[ultimatemember_group_discussion_wall group_id="309"]
[ultimatemember_group_invite_list] #
This shortcode shows a single group invites list.
Attributes
Key | Type | Default | Description |
group_id | integer | current group ID OR 0 | The group ID |
Example - Display a group invites list.
[ultimatemember_group_invite_list group_id="309"]
[ultimatemember_group_members] #
This shortcode shows a single group members list.
Attributes
Key | Type | Default | Description |
group_id | integer | 0 | The group ID |
Example - Display a group members.
[ultimatemember_group_members group_id="309"]
[ultimatemember_group_new] #
This shortcode shows a form to create a group. This is the default content for the Create Group page.
Example - Display the Create Group form.
[ultimatemember_group_new]
[ultimatemember_group_comments] #
This shortcode shows a block that contains posts with the latest comments.
Attributes
Key | Type | Default | Description |
numberposts |
integer | 5 | A number of posts to display |
order | string | 'DESC' | Sorting. Options: 'ASC', 'DESC'. |
orderby | string | `c`.`comment_date` | A database column to sort by. |
Example - Display posts with the latest comments.
[ultimatemember_group_comments]