Guides/Edit your website/Templates/Terms Query block

Terms Query block

Last reviewed on December 3, 2025

The Terms Query block displays a list of categories, tags, or custom taxonomy terms. In this guide, you will learn how to add and customize the Terms Query block on your WordPress.com site.

Understand the Terms Query block structure

The Terms Query block uses a nested structure of blocks to display your taxonomy terms:

  • Terms Query: The parent container that holds all settings and child blocks.
  • Term Template: Contains the layout for each term in the list (similar to Post Template in the Query Loop block).
  • Term Name: Displays the name of each category, tag, or other taxonomy term.
  • Term Count: Shows the number of posts associated with each term, if included.
List View shows the Terms Query block, and nested in that is the Terms Template, and nested in that are the Term Name and Term Count.
The Terms Query block structure in List View

Similar to the Query Loop block for posts, the Terms Query block automatically updates as you add or modify terms, making it ideal for building archive pages and content directories.

Add a Terms Query block

To add a Terms Query block to your site, follow these steps:

  1. Go to your site’s dashboard.
  2. Navigate to a page, post, or template where you want to display your terms and open it for editing.
  3. Click the + block inserter and search for “Terms Query.”
  4. Click the Terms Query icon to insert the block.
  5. Choose a layout variation: Name only or Name & Count:
After inserting a Terms Query block, the block shows a choice between Name and Name & Count.

The block automatically displays your site’s categories by default. The next section will show you how to change it to tags or another taxonomy on your site.

Choose which taxonomy to display

The Terms Query block can display categories, tags, project types or tags, or any custom taxonomy (typically added by plugins) on your site. To change the taxonomy, follow these steps:

  1. Use List View to select the parent Terms Query block.
  2. Open the block settings in the right sidebar.
  3. In the Taxonomy dropdown, select the taxonomy you want to display (e.g., Categories, Tags, or a custom taxonomy):
The Terms Query block settings, with Categories highlighted.
The Terms Query block settings

Configure display options

The Terms Query block includes several settings to control which terms appear and how they’re organized. Select the Terms Query block and open the block settings sidebar to access these options.

If you do not have the sidebar on the right, click the Settings icon in the top-right corner to bring up the settings. This icon looks like a square with two uneven columns:

An arrow pointing to the "Settings" icon in the top right of the WordPress Editor.

Choose the order of terms

Control the order in which terms appear:

  1. In the block settings sidebar, locate the “Order by” option.
  2. Choose to sort by name or by count.
  3. Click the Save button.

Choose specific terms

By default, all terms that meet the criteria defined in the block settings will be shown. Instead, you can select which exact terms will be shown in the list:

  1. In the block settings sidebar, find the “selected terms” setting.
  2. Type the first few letters of your category or tag name, and select it when it appears in the results.
  3. Repeat for each term you wish to display.
  4. Click the Save button.

Show or hide empty terms

By default, terms with no associated posts will be hidden. To change this behavior:

  1. In the block settings sidebar, locate the “Show empty terms” toggle.
  2. Enable this option to display terms even if they have no posts assigned.
  3. Click the Save button.

Show or hide nested terms

If your taxonomy uses a hierarchical structure (like categories with parent and child relationships), you can include these in the list:

  1. In the block settings sidebar, find the “Show nested terms” option.
  2. Enable or disable this setting based on your preference.
  3. Click the Save button.

Limit the number of terms

Set how many terms to display:

  1. In the block settings sidebar, find the “max terms” setting.
  2. Enter the maximum number of terms to show, up to 100.
    • If you select zero here, all terms will be shown.
  3. Click the Save button.

Customize the term template

The Term Template block controls how each term appears in your list. You can add blocks between elements, change the layout, and style individual components.

Switch between list and grid layouts

To change the display mode:

  1. Use List View to select the Term Template block.
  2. In the block toolbar, choose between List and Grid views.
  3. If using Grid view, you can adjust the number of columns in the block settings sidebar.

Add content between terms

You can insert additional blocks within the Term Template block to customize the appearance:

  1. Use List View to select the Term Template block.
  2. Click the + block inserter to add:
    • A Term Description block to display the description you’ve added to each category or tag in the categories or tags site settings.
    • Any other blocks, such as a Separator block between rows or an Image block for visual interest.

Customize individual term blocks

Blocks within the Terms Query block structure include their own settings:

Term Name block

The Term Name block displays the name of each term. To customize it:

  1. Click directly on a term name or use List View to select the Term Name block.
  2. In the block settings sidebar, you can enable or disable linking to the term’s archive page.
  3. Use the Styles tab to adjust typography, colors, spacing, and border.

Term Count block

The Term Count block shows the number of posts in each term. To customize it:

  1. Use List View to select the Term Count block.
  2. Use the Styles tab to adjust typography, colors, spacing, and border.

Was this guide helpful for you?

Not quite what you're looking for? Get Help!

Copied to clipboard!