An advanced block that allows displaying taxonomy terms based on different query parameters and visual configurations.
- Name:
core/terms-query - Category: theme
- API Version: 3
- Block Type: Static (saved in post content)
- Keywords:
terms,taxonomy,categories,tags,list
Attributes
Defined via the attributes property in block.json.
| Attribute | Type | Default | Description |
|---|---|---|---|
termQuery |
object |
{"perPage":10,"taxonomy":"category","order":"asc","orderBy":"name","include":[],"hideEmpty":true,"showNested":false,"inherit":false} |
— |
tagName |
string |
"div" |
— |
Supports
Defined via the supports property in block.json.
anchor:truealign:"wide","full"html:falselayout:trueinteractivity:true
Context
Defined via the usesContext and providesContext properties in block.json.
Uses context:
templateSlug
Provides context:
termQueryattributetermQuery
Block Markup
This is a static block. The markup is saved directly in the post content.
<!-- wp:terms-query -->
<div class="wp-block-terms-query"></div>
<!-- /wp:terms-query -->
Source
- block.json (reference)
- Source directory — browse
edit.js,save.js,index.php, and more.