Portfolio Loop Filter

Description

Portfolio Loop Filter adds a dynamic block for the WordPress block editor. The block creates filter buttons from the used terms of a selected taxonomy and filters the next Query Loop block below it.

The plugin is designed for block themes and portfolio grids that already use the native WordPress Query Loop block. It does not replace the Query Loop, does not register custom post types, and does not use AJAX on the frontend. The frontend script only toggles the visibility of existing Query Loop items.

Typical use cases:

  • Filter a portfolio Query Loop by project categories.
  • Filter posts by categories or tags.
  • Place multiple independent filter and Query Loop pairs on the same page.
  • Keep content management inside WordPress core blocks while adding lightweight frontend filtering.

Features:

  • Dynamic Gutenberg block.
  • Post type dropdown in the block settings.
  • Taxonomy dropdown based on the selected post type.
  • Automatic filter buttons from used taxonomy terms.
  • Filters only the next Query Loop below the filter block.
  • Optional “All” button.
  • Button alignment: left, center or right.
  • Color controls for text, active text, border, background, active background and hover/focus border.
  • Fallback styles when no custom colors are selected.

Blocks

This plugin provides 1 block.

  • Portfolio Loop Filter Creates filter buttons from used taxonomy terms and filters only the next Query Loop below the block.

Installation

  1. Upload the plugin files to the /wp-content/plugins/portfolio-loop-filter/ directory or install the plugin ZIP through the WordPress plugins screen.
  2. Activate the plugin through the “Plugins” screen in WordPress.
  3. Edit a page or template that contains a Query Loop block.
  4. Insert the “Portfolio Loop Filter” block directly above the Query Loop that should be filtered.
  5. Select the post type and taxonomy in the block sidebar.
  6. Save the page or template.

FAQ

Does this plugin create a portfolio post type?

No. It intentionally does not register custom post types or taxonomies. You can use WordPress posts, ACF-generated post types, or any other public post type that appears in the block settings.

Does the plugin replace the Query Loop block?

No. The native WordPress Query Loop block remains responsible for rendering the grid. This plugin only adds filter buttons and a small frontend script.

Can I use multiple filters on one page?

Yes. Each filter block controls the next Query Loop block below it. Use the structure “Filter, Query Loop, Filter, Query Loop” when placing multiple filterable grids on the same page.

Why do some terms not appear as buttons?

The block only renders terms that are used by published posts of the selected post type. On the frontend, buttons without a matching item in the next Query Loop are hidden automatically.

Does the frontend filtering reload the page?

No. The plugin filters existing items in the browser. It does not perform frontend AJAX requests.

Reviews

There are no reviews for this plugin.

Contributors & Developers

“Portfolio Loop Filter” is open source software. The following people have contributed to this plugin.

Contributors

Changelog

0.9

  • Added the Portfolio Loop Filter block.
  • Added post type and taxonomy dropdowns.
  • Added automatic taxonomy term buttons.
  • Added next Query Loop targeting for multiple independent filter and loop pairs.
  • Added button alignment controls.
  • Added color controls and fallback styles.
  • Added WordPress.org-style plugin headers, readme and GPL license information.