Using the Post Filter on the Front End

This is a feature of the premium plugin. Tag Groups Premium

On default WordPress pages that show lists of posts you can filter that list by tag (term) group.1 Simply append the query parameter “term_group” with the group’s ID to the URL of that page. Example:

https://www.example.com/?term_group=3

Filtering by tag group and tag

You can also filter by a tag (term) and show only posts that use this tag in a particular group. In that case use “term_group” and “term_id”. Example:

https://www.example.com/?term_id=195&term_group=3

If you want to filter by tag and group, you alway have to use both parameters “term_group” and “term_id”. It is not sufficient to use only “term_group” on a tag archive page (…/tag/my-tag/?term_group=3 won’t work).

Filtering by tag group and category

Simply use a category page and add the parameter term_group with a group’s ID. Example for WooCommerce categories:

https://www.ecample.com/product-category/accessories/?term_group=3

Other notes

Please note that in URLs the first parameter is always appended with a “?”, while all following parameters use a “&”.

If you need to filter just by a tag without a group, you simply use the standard Tag page that is part of every theme.

If the filtered list of posts is empty, you can try the tools on the Settings page under the Support tab.


Show 1 footnote
  1. That filter won’t be effective on custom lists created by other themes or plugins or when they modify the database query. It is therefore recommended to test the feature in your particular environment.

How do you rate this article?