The per_page parameter limits the items returned in a single call. This can be used to limit the number of responses, and is most useful in combination with other parameters to achieve paged calls.
Returns a list of 2 coaches.
The page parameter is an alias of the offset parameter and will return the second, third, etc. page of results, where the offset is the per_page value. Without an explicit per_page this argument is not very useful as the default is 100 and it is unlikely that we will ever even have a second page of coaches anytime soon.
Returns a list of three coaches, skipping the first three and starting on the fourth.
The offset parameter will skip a number of records. Offset is similar to page, except that it requires an explicit numeric value instead of defaulting to the per_page default.
Returns a list of 100 coaches, skipping the first three and starting on the fourth.
The categories parameter can be used numerically or in human readable values. The parameter can be called with a single value or a comma separated list of values. It will retrieve a list of coaches who either have a matching category assigned. The categories will now ignore the primary_category value, but they can be combined.
While not recommended, the categories parameter can mix string and numeric
Returns a list of coaches filtered for the category. Multiple values return an OR list, where categories=Mindfulness,Nutrition will return items from either category with no requirement that the item have both categories at once. An unrecognized numeric or string value will filter out all results if it is the only category.
The primary_category parameter can be use numerically or in human readable values. It can called with a single value or a comma separated list of values. It will retrieve a list of coaches whose primary_category value matches one of the values.
Returns a list of coaches filtered for the primary_category.
order & orderby
The order and orderby parameters allow you to sort results. The default value for order is ASC for ascending order, lowest to highest, and default orderby parameter is ID. This sorts coach results by the lowest ID first, or newest coaches last.
- orderby (string|array) – Sort retrieved users by parameter. Defaults to ‘ID’. It can be a string with a single field, a string containing a list of values separated by commas or spaces, or an array with fields.
- ‘ID‘ – Order by user id.
- ‘display_name‘ – Order by user display name.
- ‘name‘ / ‘user_name‘ – Order by user name.
- ‘include‘ – Order by the included list of user_ids (requires the include parameter) (since Version 4.1).
- ‘login‘ / ‘user_login‘ – Order by user login.
- ‘nicename‘ / ‘user_nicename‘ – Order by user nicename.
- ‘email‘ / ‘user_email‘ – Order by user email.
- ‘url‘ / ‘user_url‘ – Order by user url.
- ‘registered‘ / ‘user_registered‘ – Order by user registered date.
- ‘post_count‘ – Order by user post count.
- ‘meta_value‘ – Note that a ‘meta_key=keyname’ must also be present in the query (available with Version 3.7).
- ‘meta_value_num‘ – Note that a ‘meta_key=keyname’ must also be present in the query (available with Version 4.2).
- order (string) – Designates the ascending or descending order of the ‘orderby‘ parameter. Defaults to ‘ASC’.
- ‘ASC‘ – ascending order from lowest to highest values (1, 2, 3; a, b, c).
- ‘DESC‘ – descending order from highest to lowest values (3, 2, 1; c, b, a).
Returns a list of coaches filtered by parameters, ordered by the various options. The example call returns all coaches in the Nutrition category ordered by Display Name in descending order.
order : ASC
orderby : ID
search & searchby
The search and searchby parameters allow you to search coaches. The searchby field is an alias of the clunkily-named search_columns.
- search (string) – Searches for possible string matches on columns. Use of the * wildcard before and/or after the string will match on columns starting with*, *ending with, or *containing* the string you enter.
- search_columns (array) – List of database table columns to matches the search string across multiple columns.
- ‘ID‘ – Search by user id.
- ‘user_login‘ – Search by user login.
- ‘user_nicename‘ – Search by user nicename.
- ‘user_email‘ – Search by user email.
- ‘user_url‘ – Search by user url.
Returns a list of coaches by search term.
search : wildcard search ( *searchterm* )
searchby : ‘display_name’, ‘user_email’, ‘user_nicename’, ‘user_url’