list-categories
Retrieve and filter WordPress categories by ID, slug, parent, or post using secure API authentication. Manage and organize site content efficiently with customizable sorting and pagination options.
Instructions
Get a list of categories with filtering options
Input Schema
Name | Required | Description | Default |
---|---|---|---|
context | No | Scope under which the request is made | view |
exclude | No | Ensure result set excludes specific IDs | |
hideEmpty | No | Whether to hide terms not assigned to any posts | |
include | No | Limit result set to specific IDs | |
order | No | Order sort attribute ascending or descending | asc |
orderby | No | Sort collection by term attribute | name |
page | No | Current page of the collection | |
parent | No | Limit result set to terms assigned to a specific parent | |
password | Yes | WordPress application password | |
perPage | No | Maximum number of items to be returned | |
post | No | Limit result set to terms assigned to a specific post | |
search | No | Limit results to those matching a string | |
siteUrl | Yes | WordPress site URL | |
slug | No | Limit result set to terms with one or more specific slugs | |
username | Yes | WordPress username |
Input Schema (JSON Schema)
{
"$schema": "http://json-schema.org/draft-07/schema#",
"additionalProperties": false,
"properties": {
"context": {
"default": "view",
"description": "Scope under which the request is made",
"enum": [
"view",
"embed",
"edit"
],
"type": "string"
},
"exclude": {
"description": "Ensure result set excludes specific IDs",
"items": {
"type": "number"
},
"type": "array"
},
"hideEmpty": {
"description": "Whether to hide terms not assigned to any posts",
"type": "boolean"
},
"include": {
"description": "Limit result set to specific IDs",
"items": {
"type": "number"
},
"type": "array"
},
"order": {
"default": "asc",
"description": "Order sort attribute ascending or descending",
"enum": [
"asc",
"desc"
],
"type": "string"
},
"orderby": {
"default": "name",
"description": "Sort collection by term attribute",
"enum": [
"id",
"include",
"name",
"slug",
"include_slugs",
"term_group",
"description",
"count"
],
"type": "string"
},
"page": {
"default": 1,
"description": "Current page of the collection",
"minimum": 1,
"type": "number"
},
"parent": {
"description": "Limit result set to terms assigned to a specific parent",
"type": "number"
},
"password": {
"description": "WordPress application password",
"type": "string"
},
"perPage": {
"default": 10,
"description": "Maximum number of items to be returned",
"maximum": 100,
"minimum": 1,
"type": "number"
},
"post": {
"description": "Limit result set to terms assigned to a specific post",
"type": "number"
},
"search": {
"description": "Limit results to those matching a string",
"type": "string"
},
"siteUrl": {
"description": "WordPress site URL",
"format": "uri",
"type": "string"
},
"slug": {
"description": "Limit result set to terms with one or more specific slugs",
"items": {
"type": "string"
},
"type": "array"
},
"username": {
"description": "WordPress username",
"type": "string"
}
},
"required": [
"siteUrl",
"username",
"password"
],
"type": "object"
}