The BuddyPress Activity Shortcode ([activity-listing]) allows embedding BuddyPress activity streams directly into WordPress posts or pages. Below is an explanation of each parameter:
Parameters
1. title
- Description: Adds a title at the top of the activities block.
- Type:
string - Usage Example:
[activity-listing title="Recent Community Activities"]
2. page
- Description: Specifies the page of activity results to display.
- Page
1is the default.
- Page
- Type:
int - Default:
1 - Usage Example:
[activity-listing title="Page 2 Activities" page=2]
3. per_page
- Description: Sets how many activities to display per page.
- Type:
int - Default:
20 - Usage Example:
[activity-listing title="5 Activities Per Page" per_page=5]
4. max
- Description: Limits the total number of activities returned.
- Use
falsefor unlimited results.
- Use
- Type:
int|bool - Default:
false - Usage Example:
[activity-listing title="Maximum 10 Activities" max=10]
6. sort
- Description: Specifies the sort order of activities, either ascending (
ASC) or descending (DESC). - Type:
string - Default:
DESC - Usage Example:
[activity-listing title="Sort Oldest First" sort="ASC"]
7. exclude
- Description: Excludes specific activity IDs from the results.
- Type:
array|bool - Default:
false - Usage Example:
[activity-listing title="Exclude Specific Activities" exclude="23,45"]
8. in
- Description: Includes only specific activity IDs in the results.
- Type:
array|bool - Default:
false - Usage Example:
[activity-listing title="Include Specific Activities" in="12,34"]
9. include
- Description: Queries exact activity IDs, overriding other filters.
- Type:
array|bool - Default:
false - Usage Example:
[activity-listing title="Only Activity 56" include="56"]
10. scope
- Description: Filters activities based on pre-defined scopes:
just-me(user-specific),friends(friend activities),groups(group-related activities),favorites(favorited activities),mentions(user @-mentions).
- Type:
string - Default:
false - Usage Example:
[activity-listing title="My Activities" scope="just-me"]
11. object
- Description: Filters activities by database component or plugin slug.
- Type:
string|array|bool - Default:
false - Usage Example:
[activity-listing title="Group Activities" object="groups"]
12. user_id
- Description: Fetches activities for specific user(s) by their ID.
- Type:
int|array|bool - Default:
false - Usage Example:
[activity-listing title="User 34 Activities" user_id="34"]
13. action
- Description: Filters activities by action type (e.g.,
activity_update). - Type:
string|array|bool - Default:
false - Usage Example:
[activity-listing title="Updates Only" action="activity_update"]
14. primary_id
- Description: Filters activities by primary
item_id. - Type:
int|array|bool - Default:
false - Usage Example: [activity-listing title=”Filter by Item 20″ object=”groups” primary_id=”20″]
15. secondary_id
- Description: Filters by secondary
item_id. - Type:
int|array|bool - Default:
false - Usage Example:
[activity-listing title="Secondary ID Filter" secondary_id="15"]
16. offset
- Description: Returns activities with IDs greater than or equal to a given value.
- Type:
int|array|bool - Default:
false - Usage Example:
[activity-listing title="Start from ID 50" offset="50"]
17. show_hidden
- Description: Determines if hidden activities (
hide_sitewide) are shown. - Type:
bool - Default:
false - Usage Example:
[activity-listing title="Include Hidden" show_hidden=true]
18. spam
- Description: Filters spam activities:
ham_only(non-spam),spam_only,false(all activities).
- Type:
string|bool - Default:
ham_only - Usage Example:
[activity-listing title="Show All Activities" spam=false]









