What are accepted parameters for group shortcodes?

[groups-listing]

  • title ( title= “Groups” ):  Accepts any string value for the title 
  • Type ( type= “alphabetical” ): Accepts “random”, “alphabetical”, “newest”, and “popular”.
  • Per_page ( per_page= “3” ): Accepts any positive number. The default is 20.
  • Max ( max= “4” ):  Accepts any positive number. The default is false(unlimited).
  • Include ( include= “18,9” ): Accepts string of comma-separated group ids. This value defaults to the ID of that item. Otherwise, the default is “false”.
  • Exclude ( exclude= “18,9” ): Accepts string of comma-separated group ids. This value defaults to the ID of that item. Otherwise, the default is “false”.
  • group_type ( group_type= “technical” ): accepts “string” value.
  • Search_terms ( search_terms= “Matrix” ): Accepts String Value.
  • Orderby ( orderby= “total_member_count” order = “DESC” ): Accepts ”name”, “last_activity”, ”total_member_count”, 
  • Loop_layout ( loop_ayout=”two” ): Accepts “one”, “two”, “three”, and  “four”.
  • Order ( order= “DESC” ): Accepts “ASC” or “DESC”.

[groups-listing]

This shortcode will help you to display all the groups on any of the WordPress posts/pages.

[groups-listing title=”All Group”]

This shortcode helps you to display groups with titles.

[groups-listing type=”alphabetical”]

With the help of this shortcode, group display with ‘type’. If type is alphabetically then group display alphabetically order.

[groups-listing per_page=2]

With the help of this shortcode, allow a number of groups to display per page.

[groups-listing max=”5″]

With the help of this shortcode, only five groups will be displayed out of a total number of groups.

[groups-listing user_id=1]

With the help of this shortcode, those groups will be displayed where user id=1 will exist.

[groups-listing search_terms=”swashbuckling”]

With the help of this shortcode, only those groups will be displayed where this keyword will exist.

[groups-listing parent_id=4]

With the help of this shortcode, only those groups whose parent id is 4  will be displayed.

[groups-listing group_type=designer,developer]

With the help of this shortcode, only those groups whose group types are developers and designers will be displayed.

[groups-listing group_type__not_in=”designer”]

With the help of this shortcode, only those groups whose group type are designer will be not displayed.

[groups-listing group_type__in=”developer”]

With the help of this shortcode, only those groups whose group types are developers will be displayed.

[groups-listing exclude=5,6]

With the help of this shortcode, only those groups whose group IDs are 5 and 6 will not be displayed in the group list.

[groups-listing include=5,6]

With the help of this shortcode, only those groups whose group IDs are 5 and 6 will be displayed in the group list.

[groups-listing orderby=”last_activity”]

With the help of this shortcode, the recent last activity group display on the top of the group list.

[groups-listing orderby=”total_member_count” order=”ASC or DESC”]

With the help of this shortcode,group will be display according to the number of members with the ascending and descending order.

[groups-listing orderby=”name” order=”ASC or DESC”]

With the help of this shortcode,group will be display according to the name in ascending and descending order.

Ascending Order:

Descending Order:

[groups-listing orderby=”date_created” order=”ASC”]

With the help of this shortcode, the groups will be displayed according to the date_created with the ascending and descending order.

 

2 thoughts on “What are accepted parameters for group shortcodes?

  1. Do you have code to help with building a search field for the “search_terms” parameter?

  2. Is there a shortcode parameter to limit the groups listing to only the groups the logged is user is a member of?

Leave a Reply

Your email address will not be published. Required fields are marked *

Update on January 5, 2024