On default WordPress pages that show lists of posts you can filter that list by tag (term) group. Simply append the query parameter “term_group” with the group’s ID to the URL of that page. Example:
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:
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).
Simply use a category page and add the parameter term_group with a group’s ID. Example for WooCommerce categories:
- This filter won’t be effective on custom lists created by other themes or plugins or when they modify the post query. Tag Groups makes use of the “pre_get_posts” action hook of the default WordPress database query. If any other plugin or theme removes it, the filter won’t work. It is therefore recommended to test the filter in your particular environment.
- 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 unexpectedly empty, you can try the tools on the Settings page under the Support tab.