Appearance
Term Query
The Term Query node fetches taxonomy terms from WordPress. Use it to load categories, tags, or custom taxonomy terms registered by WP-Nexus or other plugins.
Configuration
| Property | Type | Default | Description |
|---|---|---|---|
taxonomy | string | category | The taxonomy slug (e.g., category, post_tag, or a WP-Nexus taxonomy like nxs_mytax). |
hideEmpty | boolean | false | When true, only returns terms that have at least one associated post. |
orderBy | string | name | Sort field: name, slug, count, id, term_id, description. |
order | string | ASC | Sort direction: ASC or DESC. |
conditions | array | [] | Array of condition objects. Each has field, op, value, and optionally value2 (for BETWEEN). See Table Query: Conditions for full details. |
conditionLogic | string | AND | How multiple conditions combine: AND or OR. |
limit | number | 100 | Maximum terms to return (capped at 1,000). |
offset | number | 0 | Number of terms to skip. |
Input
This is a source node -- it has no input port.
Output
Returns an array of term objects with core fields and all term meta flattened:
json
[
{
"term_id": 5,
"name": "JavaScript",
"slug": "javascript",
"description": "Posts about JavaScript programming",
"count": 12,
"icon_url": "https://example.com/js-icon.png"
}
]How It Works
The node calls WordPress get_terms() with the configured arguments. For each term, it:
- Extracts core fields:
term_id,name,slug,description,count. - Fetches all term meta via
get_term_meta()and merges it into the row.
TIP
This node supports the enhanced conditions system with multiple conditions, AND/OR logic, and operators like BETWEEN, IN, NOT IN, IS NULL, and IS NOT NULL. See the Table Query: Conditions documentation for full details. Legacy single-condition properties (whereField, whereOp, whereValue) still work for backward compatibility.
WHERE Filtering
namewithLIKE: Uses thename__likeparameter for partial name matching.slugwith=: Uses theslugparameter for exact slug matching.- Other core fields (
description,count): Filtered in PHP after the query. - Meta fields: Uses
meta_queryfor direct database filtering.
Example Use Cases
List all categories
taxonomy: "category"
orderBy: "name"
order: "ASC"Load non-empty tags sorted by popularity
taxonomy: "post_tag"
hideEmpty: true
orderBy: "count"
order: "DESC"
limit: 20Search terms by name
taxonomy: "category"
whereField: "name"
whereOp: "LIKE"
whereValue: "tech"Filter by custom term meta
taxonomy: "nxs_locations"
whereField: "region"
whereOp: "="
whereValue: "europe"TIP
Term queries are useful for building category navigation, tag clouds, and filter dropdowns. Combine with a Post Query node filtered by term to create category-based listings.