The [members-listing] shortcode allows you to display a list of members on your WordPress pages or posts with a variety of customizable parameters. Below is an explanation of each parameter, along with examples to illustrate how you can use them:
Parameters
1. title
Description: Specifies the title displayed at the top of the member list.
Type: String
Example:
[members-listing title="Our Active Members"]
This will display “Our Active Members” as the title above the member list.
2. type
Description: Defines the sorting order for the member list.
Accepted Values: "active", "random", "newest", "popular", "online", "alphabetical"
Default: active
Example:
[members-listing type="newest"]
This will display the newest members first.
3. page
Description: Specifies the page of results to display (for paginated results).
Type: int or bool
Default: false
Example:
[members-listing page="5"]
This will display the second page of members.
4. per_page
Description: Specifies the number of members to display per page.
Type: int or bool
Default: 20
Example:
[members-listing per_page="2"]
This will display 10 members per page.
5. max
Description: Specifies the maximum number of results to return.
Type: int or bool
Default: false (unlimited)
Example:
[members-listing max="50"]
This will limit the results to a maximum of 50 members.
6. page_arg
Description: The query parameter string used for pagination links.
Type: String
Default: upage
Example:
[members-listing page_arg="custom_page"]
Pagination links will use ?custom_page= instead of ?upage=.
7. container_class
Description: CSS class for the member list container.
Type: String
Default: members
Example:
[members-listing container_class="custom-members-list"]
This will add the custom-members-list class to the member list container.
8. exclude
Description: Excludes specific users by ID.
Type: array, string, or bool
Default: false
Example:
[members-listing exclude="5,6,7"]
This will exclude users with IDs 5, 6, and 7.
9. populate_extras
Description: Fetch optional data (e.g., friend counts).
Type: bool
Default: true
Example:
[members-listing populate_extras="false"]
This will not fetch additional data like friend counts.
10. include
Description: Limit results to specific user IDs.
Type: array, int, string, or bool
Default: false
Example:
[members-listing include="5,6,7"]
This will only show users with IDs 5, 6, and 7.
11. meta_value
Description: Filters members by a specific usermeta value (used with meta_key).
Type: String
Example:
[members-listing meta_key="location" meta_value="New York"]
This will display members whose location meta field is “New York.”
12. search_terms
Description: Filters members based on a search term.
Type: String
Default: false
Example:
[members-listing search_terms="John"]
This will display members whose names or other searchable fields contain “John.”
13. user_id
Description: Limits results to friends of a specific user.
Type: int
Default: 0
Example:
[members-listing user_id="15"]
This will show only the friends of the user with ID 15.
14. member_type
Description: Limits results to specific member types.
Type: string or array
Example:
[members-listing member_type="premium"]
This will display only “premium” members.
15. exclude_member_role
Description: Excludes members with specific roles.
Type: string or array
Default: ham_only
Example:
[members-listing exclude_member_role="administrator"]
This will exclude administrators from the results.











