Term Query Loop Block

Project
  • Initial Release: December 2024
Screenshot of WordPress Block Editor showing the Term Query Loop Block plugin in action, displaying a grid of fruit category images (Apples, Oranges, Bananas) with the text 'The missing block that unlocks the potential of Taxonomies in the block editor!' prominently featured

The Term Query Loop Block plugin is an advanced WordPress block that fills a significant gap in WordPress core functionality. It allows you to display taxonomy terms (categories, tags, or custom taxonomies) with the same flexibility and power that the Query Loop block provides for posts.

The Problem

WordPress has an excellent Query Loop block for displaying posts, but there’s no equivalent for displaying taxonomy terms. If you want to create a custom layout for showing categories, tags, or custom taxonomy terms on your site, you’re stuck with limited options or complex custom code.

This plugin was created to address this exact issue in the WordPress Gutenberg repository, providing a solution that follows the same patterns and extensibility as core WordPress blocks.

Key Features

  • Taxonomy Terms Block – Query and display terms from any taxonomy with flexible filtering options
  • Term Template Block – Create custom layouts for individual terms, similar to Post Template
  • Block Variations – Pre-built variations for Term Title, Term Description, Term Count, and Term Link
  • Block Bindings – Dynamic data insertion with support for term meta and custom transformations
  • Extensibility – Full support for custom variations, additional controls, and query modifications

How It Works

WordPress Block Editor interface showing the Term Query Loop Block in action, displaying a list of category terms including Apples, Bananas, and Grapes with their descriptions and 'View posts' buttons

The plugin provides two main blocks that work together:

  • Taxonomy Terms (cr0ybot/term-query) – The main query block that fetches terms based on your criteria
  • Term Template (cr0ybot/term-template) – Defines how each individual term should be displayed

Inside the Term Template, you can use block variations that automatically bind to term data like title, description, count, and archive links.

Advanced Capabilities

Block Bindings

The plugin includes powerful block bindings for dynamic content:

  • Term binding – Access term properties like ID, slug, name, description, count
  • Term Meta binding – Display custom term meta fields with built-in transformations

Extensibility

Built with developers in mind:

  • Create custom block variations with preset configurations
  • Add custom controls and allowlist specific taxonomies
  • Filter queries on both frontend and editor
  • Custom transformations for term meta values

Screenshots

Development Status

This plugin is currently in active development and considered a work-in-progress. While functional, it’s not yet ready for production use. You can download the latest prerelease to test it out.

The plugin supports Git Updater for easy updates during development.

To file issues and see what else is in progress, see the issues on GitHub.

Additional Documentation

For detailed documentation on extending the plugin, block variations, and available filters, check out the complete README on GitHub.