What are accepted parameters for activity shortcodes?

Following are the shortcodes for activity listing you can use this in your post and pages:


  • Title ( title=”Activity List” ): Accepts any string value for the activity title
  • Allow_posting ( allow_posting=”yes” ): Accepts “yes” or “no
  • Display_comments (display_comments=”threaded”): Accepts “threaded”, “stream” or false. The default is “threaded
  • Include ( include=”577, 585″ ): Accepts “string” of comma-separated activity ids. This value defaults to the ID of that item. Otherwise, the default is “false”.
  • sort ( sort=”ASC”  ): Accepts ‘ASC’ or ‘DESC’. Default: ‘DESC’.
  • Object( object=”Groups” ): Accepts “Groups”, “Friends”, “Profile”, “Status”, and “Blogs”.
  • Per_page ( per_page=”2″ ): Accepts any positive number. The default is 20.
  • per_page=”2″ page=”2″: page’ => which page to load, e.g 1st page or 10th page of activity
  • load_more=yes: load_more’ => ‘no’, // (string) no or yes. Use load more button for loading the activities in current context.
  • role=”author”: role’ => false, // (string) One of more WordPress roles. eg. ‘administrator’ or ‘administrator,editor’. It will filter the activity and list for the given roles only.
  • object=groups for_group=”men-in-black”: for_group’ => ”, // (string) specify a group slug. Only valid if the object=groups is specified
  • Max ( max=”3″): Accepts any positive number.
  • scope ( scope=”just-me” ): Accepts ‘just-me’, ‘friends’, ‘groups’, ‘favorites’, and ‘mentions’. The default is ‘false’.
  • User_id ( user_id=18 ): Accepts integer values.
  • Action ( action=”activity_update” ): Accepts “activity_update”, “new_forum_post”, “profile_updated”. The default is false.
  • Primary_id ( object=”Groups primary_id=27″ ): object ID to filter on e.g. it accepts a group_id or forum_id or blog_id etc.
  • Search_terms ( search_terms=”inspiration” ): Accepts any search terms related to the activity.


Here is the way you can specify options

[activity-listing option_name=option_val option_name2=option_val2 and so on]

For Example: [activity-listing title=Chris_Group object=Groups per_page=1].


The accepted parameters:-

  • title (string):- What should be the title of the activities section

 [activity-listing title=My_Activity_Listing per_page=2].

  • display_comments (sting|bool):- How to handle activity comments.
  • Possible values: – ‘threaded’ – comments appear in a threaded tree, under their parent items.
    – ‘stream’ – the activity stream is presented in a flat manner, with comments sorted in chronological order alongside other activity items.
    – false – don’t fetch activity comments at all.
    Default: ‘threaded’.
  • include (string):- Activity IDs or string of activity IDs comma-separated to query. Providing an ‘include’ activity IDs will override all other filters passed in the argument. When viewing the permalink page for a single activity item, this value defaults to the ID of that item. Otherwise, the default is false.
  • in (string):- Activity IDs or string of activity IDs comma-separated to limit the query by (IN). ‘in’ is intended to be used in conjunction with other filter parameters. Default: false.
  • exclude (string):- Activity IDs or string of activity IDs comma-separated to exclude. Default: false.
  • sort (string):- ‘ASC’ or ‘DESC’. Default: ‘DESC’.

[activity-listing title=Chris_Group object=Groups sort=ASC].

  • per_page (int):- Number of results per page. Default: 20.

Example: [activity-listing per_page=4]

  • page_args (int):- String used as a query parameter in pagination links. Default: ‘page’.
  • max (int):- Limit the maximum no. of activities to be included in the list.

[activity-listing title=Max_Activity_Listing max=3].

  • scope (string):- Use a BuddyPress pre-built filter.
    – ‘just-me’ retrieves items belonging only to a user; this is equivalent to passing a ‘user_id’ argument.
    – ‘friends’ retrieves items belonging to the friends of a user.
    – ‘groups’ retrieves items belonging to groups to which a user belongs to.
    – ‘favorites’ retrieves a user’s favorited activity items.
    – ‘mentions’ retrieves items where a user has received an @-mention.
    The default value of ‘scope’ is set to one of the above if that value appears in the appropriate place in the URL; eg, ‘scope’ will be ‘groups’
    when visiting http://example.com/members/joe/activity/groups/.
    Otherwise defaults to false.
  • user_id (int):- If you want to list a particular user’s activity
  • object (string):- object to filter on e.g. groups, profile, status, friends(what type of activity is this)
  • action (string):- action to filter on e.g. activity_update, new_forum_post, profile_updated(why this activity was created)
  • primary_id (int):- object ID to filter on e.g. a group_id or forum_id or blog_id etc. We will see the use in a minute.

[activity-listing object=groups primary_id=2].

  • secondary_id (int):- secondary object ID to filter on e.g. a post_id(I don’t think you are going to use it)
  • search_terms (String):- In case you want to list the results of activity search
  • allow_posting (int):- If you want to allow users to post. It will include the default activity posting form. It is experimental and may have issues on some of the themes.
  • hide_on_activity (int):- Default 1. Hide/show the shortcode content on activity pages(If you are using it in the sidebar and want it to be visible on user/group/site activity page, set it to 0)
  • container_class (string):- Default ‘activity’ . Allows changing the class of the shortcode contents wrapper. If you have the hide_on_activity=0, then please set it to some other value than ‘activity'(Maybe ‘activities’ or something else). If you do not change it, On the user/group/site activity page, the activity filter will affect the content of the shortcodes. It is suggested to change it if hide_on_activity=0 is set.

This shortcode can take the following parameters:


[activity-listing per_page=2]

This [activity-listing per_page=2] shortcode shows a list of Activity, and it accompanies a great deal of parameters to customize which activity is appeared and how they are spread out.

[activity-listing user_id=1]

You can use this shortcode to shows the content of the user activity list. The shortcode can be used on any page or widget area.


[activity-listing search_terms=’Arts and Science.’]

This shortcode uses to show list activities containing the search word “Arts and Science.”


[activity-listing object=groups]

This [activity-listing object=groups] shortcode uses to shows the List of all activities of the group.

[activity-listing object=groups primary_id=2]


[activity-listing object=groups primary_id=40 per_page=2]

With the help of this shortcode, we can display particular group activities per page.


















[activity-listing title=Posted]

With the help of this shortcode , we can display activities by title.



















[activity-listing allow_posting=true]

Use this shortcode to allow posting on shortcode-driven pages.













[activity-listing  scope=favorites]

With the help of this shortcode, display the list of favorites activities .

















[activity-listing activity-stream user_id=3 sort=”DESC”]

With the help of this shortcode, display the list activity of the particular user in descending order.
















[activity-listing activity-stream user_id=3 sort=”ASC”]

With the help of this shortcode, display the list activity of the particular user in descending order.
















[activity-listing scope=mentions]

With the help of this shortcode, display the list of mention activities .




Update on May 22, 2024