PHPackages                             humanmade/query-filter - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Utility &amp; Helpers](/categories/utility)
4. /
5. humanmade/query-filter

ActiveWordpress-plugin[Utility &amp; Helpers](/categories/utility)

humanmade/query-filter
======================

Query Loop Block filters

v0.3.1(1w ago)11715.8k↑63.4%33[13 issues](https://github.com/humanmade/query-filter/issues)[9 PRs](https://github.com/humanmade/query-filter/pulls)GPL-2.0-or-laterPHP

Since Sep 6Pushed 3mo ago19 watchersCompare

[ Source](https://github.com/humanmade/query-filter)[ Packagist](https://packagist.org/packages/humanmade/query-filter)[ RSS](/packages/humanmade-query-filter/feed)WikiDiscussions main Synced yesterday

READMEChangelog (10)Dependencies (3)Versions (22)Used By (0)

Query Loop Filters
==================

[](#query-loop-filters)

[![image](https://private-user-images.githubusercontent.com/494927/372935172-85358de8-0929-47fe-85f5-b53a59fb522e.png?jwt=eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3ODI5Njg1MTMsIm5iZiI6MTc4Mjk2ODIxMywicGF0aCI6Ii80OTQ5MjcvMzcyOTM1MTcyLTg1MzU4ZGU4LTA5MjktNDdmZS04NWY1LWI1M2E1OWZiNTIyZS5wbmc_WC1BbXotQWxnb3JpdGhtPUFXUzQtSE1BQy1TSEEyNTYmWC1BbXotQ3JlZGVudGlhbD1BS0lBVkNPRFlMU0E1M1BRSzRaQSUyRjIwMjYwNzAyJTJGdXMtZWFzdC0xJTJGczMlMkZhd3M0X3JlcXVlc3QmWC1BbXotRGF0ZT0yMDI2MDcwMlQwNDU2NTNaJlgtQW16LUV4cGlyZXM9MzAwJlgtQW16LVNpZ25hdHVyZT01NTVhNzBmZmY5YmQzZWNjMGFiOTJjOWEwYzFmMDk0NzdlOTU5Y2NhYzkzNDI3ZDMxZGU2OGVhNDFhMTA4Zjg3JlgtQW16LVNpZ25lZEhlYWRlcnM9aG9zdCZyZXNwb25zZS1jb250ZW50LXR5cGU9aW1hZ2UlMkZwbmcifQ.y5YrBon3Gu-o5w5tAqC0Ynm9aJvMiH4dbb62yT98rzk)](https://private-user-images.githubusercontent.com/494927/372935172-85358de8-0929-47fe-85f5-b53a59fb522e.png?jwt=eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3ODI5Njg1MTMsIm5iZiI6MTc4Mjk2ODIxMywicGF0aCI6Ii80OTQ5MjcvMzcyOTM1MTcyLTg1MzU4ZGU4LTA5MjktNDdmZS04NWY1LWI1M2E1OWZiNTIyZS5wbmc_WC1BbXotQWxnb3JpdGhtPUFXUzQtSE1BQy1TSEEyNTYmWC1BbXotQ3JlZGVudGlhbD1BS0lBVkNPRFlMU0E1M1BRSzRaQSUyRjIwMjYwNzAyJTJGdXMtZWFzdC0xJTJGczMlMkZhd3M0X3JlcXVlc3QmWC1BbXotRGF0ZT0yMDI2MDcwMlQwNDU2NTNaJlgtQW16LUV4cGlyZXM9MzAwJlgtQW16LVNpZ25hdHVyZT01NTVhNzBmZmY5YmQzZWNjMGFiOTJjOWEwYzFmMDk0NzdlOTU5Y2NhYzkzNDI3ZDMxZGU2OGVhNDFhMTA4Zjg3JlgtQW16LVNpZ25lZEhlYWRlcnM9aG9zdCZyZXNwb25zZS1jb250ZW50LXR5cGU9aW1hZ2UlMkZwbmcifQ.y5YrBon3Gu-o5w5tAqC0Ynm9aJvMiH4dbb62yT98rzk)

This plugin allows you to easily add filters to any query loop block.

Provides 2 new blocks that can be added within a query loop block to allow filtering by either post type or a taxonomy. Also supports using the core search block to allow you to search.

Compatible with both the core query loop block and the [Advanced query loop plugin](https://wordpress.org/plugins/advanced-query-loop/) (In fact, in order to use post type filters, use of the Advanced Query Loop plugin is required).

Easy to use and lightweight, built using the WordPress Interactivity API.

Usage
-----

[](#usage)

- Add a query block. This can anyhere that the query block is supported e.g. page, template, or pattern.
- Add one of the filter blocks and configure as required:
    - Taxonomy filter. Select which taxonomy to to use, customise the label (and whether it's shown), and customise the text used when none is selected.
    - Post type filter. Customise the label (and whether it's shown), as well as the text used when no filter is applied.
    - Search block. No extra options.

[![image](https://private-user-images.githubusercontent.com/494927/372997532-e2f9b62d-91f7-4c22-87ac-078b4d031a60.png?jwt=eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3ODI5Njg1MTMsIm5iZiI6MTc4Mjk2ODIxMywicGF0aCI6Ii80OTQ5MjcvMzcyOTk3NTMyLWUyZjliNjJkLTkxZjctNGMyMi04N2FjLTA3OGI0ZDAzMWE2MC5wbmc_WC1BbXotQWxnb3JpdGhtPUFXUzQtSE1BQy1TSEEyNTYmWC1BbXotQ3JlZGVudGlhbD1BS0lBVkNPRFlMU0E1M1BRSzRaQSUyRjIwMjYwNzAyJTJGdXMtZWFzdC0xJTJGczMlMkZhd3M0X3JlcXVlc3QmWC1BbXotRGF0ZT0yMDI2MDcwMlQwNDU2NTNaJlgtQW16LUV4cGlyZXM9MzAwJlgtQW16LVNpZ25hdHVyZT1lOWZlYTJlMjEzNmUzZTBjYTE0NDNkNWZkNjZkMTBjYTM2NTZmZjhiYTQ0MDdlZjZiNjY3YzczMzViMmU3ZGM1JlgtQW16LVNpZ25lZEhlYWRlcnM9aG9zdCZyZXNwb25zZS1jb250ZW50LXR5cGU9aW1hZ2UlMkZwbmcifQ.F5WiFph0QK4rtfbjDksJomGP9Hur1-fURaxRt7UGrPY)](https://private-user-images.githubusercontent.com/494927/372997532-e2f9b62d-91f7-4c22-87ac-078b4d031a60.png?jwt=eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3ODI5Njg1MTMsIm5iZiI6MTc4Mjk2ODIxMywicGF0aCI6Ii80OTQ5MjcvMzcyOTk3NTMyLWUyZjliNjJkLTkxZjctNGMyMi04N2FjLTA3OGI0ZDAzMWE2MC5wbmc_WC1BbXotQWxnb3JpdGhtPUFXUzQtSE1BQy1TSEEyNTYmWC1BbXotQ3JlZGVudGlhbD1BS0lBVkNPRFlMU0E1M1BRSzRaQSUyRjIwMjYwNzAyJTJGdXMtZWFzdC0xJTJGczMlMkZhd3M0X3JlcXVlc3QmWC1BbXotRGF0ZT0yMDI2MDcwMlQwNDU2NTNaJlgtQW16LUV4cGlyZXM9MzAwJlgtQW16LVNpZ25hdHVyZT1lOWZlYTJlMjEzNmUzZTBjYTE0NDNkNWZkNjZkMTBjYTM2NTZmZjhiYTQ0MDdlZjZiNjY3YzczMzViMmU3ZGM1JlgtQW16LVNpZ25lZEhlYWRlcnM9aG9zdCZyZXNwb25zZS1jb250ZW50LXR5cGU9aW1hZ2UlMkZwbmcifQ.F5WiFph0QK4rtfbjDksJomGP9Hur1-fURaxRt7UGrPY)

Installation
------------

[](#installation)

### Using Composer

[](#using-composer)

This plugin is available on packagist.

`composer require humanmade/query-filter`

### Manually from Github.

[](#manually-from-github)

1. Download the plugin from the [GitHub repository](https://github.com/humanmade/query-filter).
2. Upload the plugin to your site's `wp-content/plugins` directory.
3. Activate the plugin from the WordPress admin.

Built assets are not committed to `main`. Manual or Composer installs should track the `release` branch (or a tagged release), which contains the compiled `build` directory.

Local Development
-----------------

[](#local-development)

This project uses [wp-env](https://developer.wordpress.org/block-editor/reference-guides/packages/packages-env/) to run a lightweight, containerized WordPress instance at [localhost:3031](http://localhost:3031) for testing purposes. The default username for the localhost environment is `admin`, with the password `password`.

These commands can be used to interact with the environment:

CommandPurpose`npm run env:start`Start the local environment at `npm run env:stop`Turn off the local environment`npm run env:cli -- wp ...`Run WP-CLI commands within the environment`npm run env:logs`Open (and tail) the error logs for the application‡`npm run env:db`Open the database in the mysql command line`npm run env:destroy`Fully destroy the local environment (deletes container database)‡ This command deliberately filters out GET/OPTIONS/HEAD/POST/PUT access log entries

Release Process
---------------

[](#release-process)

Merges to `main` automatically [build](https://github.com/humanmade/query-filter/actions/workflows/build-release-branch.yml) to the `release` branch. A project may track the `release` branch using [Composer](https://getcomposer.org/) to pull in the latest built beta version.

Commits on the `release` branch may be tagged for installation via [Packagist](https://packagist.org/packages/humanmade/query-filter) and marked as releases in GitHub for manual download, using a manually-dispatched ["Tag and Release" GH Actions workflow](https://github.com/humanmade/query-filter/actions/workflows/tag-and-release.yml).

To tag a new release:

1. Choose the target version number using [semantic versioning](https://semver.org/).
2. Check out a `prepare-v#.#.#` branch and bump the `Version` in the [query-filter.php](./query-filter.php) PHPDoc header.
3. Open a pull request titled "Prepare release v#.#.#".
4. Review and merge the "Prepare release" pull request.
5. Wait for the `release` branch to [update](https://github.com/humanmade/query-filter/actions/workflows/build-release-branch.yml) with the build that includes the new version number.
6. On the ["Tag and Release" GH Action page](https://github.com/humanmade/query-filter/actions/workflows/tag-and-release.yml):
    - Click "Run workflow" in the `workflow_dispatch` banner.
    - Fill out the "Version tag" field with your target version number. This must match the `Version` in `query-filter.php`. Use the format `v#.#.#`.
    - Click "Run workflow" to apply the specified tag to the `release` branch.

Once the workflow completes, the new version is [tagged](https://github.com/humanmade/query-filter/tags) and listed in [releases](https://github.com/humanmade/query-filter/releases).

###  Health Score

50

—

FairBetter than 95% of packages

Maintenance86

Actively maintained with recent releases

Popularity45

Moderate usage in the ecosystem

Community23

Small or concentrated contributor base

Maturity39

Early-stage or recently created project

 Bus Factor1

Top contributor holds 68.2% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Every ~59 days

Recently: every ~50 days

Total

12

Last Release

9d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/77dbeefb7745010589603f2ffc6ff310d8f700b58e08d52af190744c43342526?d=identicon)[roborourke](/maintainers/roborourke)

---

Top Contributors

[![roborourke](https://avatars.githubusercontent.com/u/23417?v=4)](https://github.com/roborourke "roborourke (30 commits)")[![mattheu](https://avatars.githubusercontent.com/u/494927?v=4)](https://github.com/mattheu "mattheu (8 commits)")[![jeremyfelt](https://avatars.githubusercontent.com/u/286171?v=4)](https://github.com/jeremyfelt "jeremyfelt (3 commits)")[![altrugon](https://avatars.githubusercontent.com/u/398069?v=4)](https://github.com/altrugon "altrugon (1 commits)")[![jonathanpryer-seon](https://avatars.githubusercontent.com/u/183589407?v=4)](https://github.com/jonathanpryer-seon "jonathanpryer-seon (1 commits)")[![ocean90](https://avatars.githubusercontent.com/u/617637?v=4)](https://github.com/ocean90 "ocean90 (1 commits)")

### Embed Badge

![Health badge](/badges/humanmade-query-filter/health.svg)

```
[![Health](https://phpackages.com/badges/humanmade-query-filter/health.svg)](https://phpackages.com/packages/humanmade-query-filter)
```

###  Alternatives

[helsingborg-stad/municipio

A bootstrap theme for creating municipality sites.

4028.5k10](/packages/helsingborg-stad-municipio)[mediawiki/maps

Adds various mapping features to MediaWiki

84152.3k3](/packages/mediawiki-maps)[starcitizentools/citizen-skin

A beautiful, usable, responsive MediaWiki skin with in-depth extension support. Originally developed for the Star Citizen Wiki.

3376.6k](/packages/starcitizentools-citizen-skin)[civicrm/civicrm-drupal-8

Open source constituent relationship management for non-profits, NGOs and advocacy organizations.

19251.4k3](/packages/civicrm-civicrm-drupal-8)[altis/core

Core module for Altis

19228.0k3](/packages/altis-core)[pfefferle/wordpress-activitypub

The ActivityPub protocol is a decentralized social networking protocol based upon the ActivityStreams 2.0 data format.

5721.7k4](/packages/pfefferle-wordpress-activitypub)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
