queryCategories( )


Creates a query to retrieve a list of categories.

The Query Categories method builds a query to retrieve a list of up to 100 categories per language, and returns a CategoriesQueryBuilder object.

The response contains the query definition, which is typically used to run the query using the find() method.

You can refine the query by chaining CategoriesQueryBuilder methods to the query. CategoriesQueryBuilder methods enable you to sort, filter, and control the results that Query Categories returns. Any methods chained to the Query Categories method are applied in the order that they are called.

Query Categories runs with these CategoriesQueryBuilder defaults, which you can override.

The following CategoriesQueryBuilder methods are supported for Query Categories. For a full description of the Categories object, see the response for the items property in CategoriesQueryResult.

PROPERTYSUPPORTED FILTERS & SORTING
_ideq(),ne(),in(),ascending(),descending()
labeleq(),ne(),startsWith(),exists(),in(),ascending(),descending()
postCounteq(),ne(),lt(),le(),gt(),ge(),in(),ascending(),descending()
titleeq(),ne(),startsWith(),exists(),in(),ascending(),descending()
displayPositioneq(),ne(),lt(),le(),gt(),ge(),in(),ascending(),descending()
translationIdeq(),ne(),exists(),in()
languageeq(),ne(),exists(),in(),ascending(),descending()
slugeq(),ne(),exists(),in(),ascending(),descending()
Permissions
Manage Blog
Manage Blog
Read Blog
Read Draft Blog Posts
Learn more about app permissions.
Method Declaration
Copy
Method Parameters
optionsQueryCategoriesOptions

Options specifying which fields to return.

Returns
Errors

This method doesn't return any custom errors, but may return standard errors. Learn more about standard Wix errors.

Did this help?