Query Terms by Post Type
WordPress plugin that adds options for filtering taxonomy term retrieval by post types with assigned terms.
by UCF Web Communications · github.com/ucf/query-terms-by-post-type
★ 0stars
0forks
Install
No release zip yet. The repository archive installs, but the folder name will carry the branch suffix and updates will not flow:
wp plugin install https://github.com/ucf/query-terms-by-post-type/archive/refs/heads/main.zipDeclares an update source (UCF/Query-Terms-by-Post-Type), so updates arrive through the plugin's own updater.
From the readme
Query Terms by Post Type #
Adds options for filtering taxonomy term retrieval by post types with assigned terms.
Description ##
By default, when querying taxonomy terms throughout WordPress (e.g. via getterms()), terms assigned to all post types the taxonomy is registered on are returned. For instance, if your site has the taxonomy "genre" available on the post types "book" and "magazine", and you want to retrieve a list of genres assigned to just magazines, you'd have to first retrieve all magazine IDs, and then perform a wpgetobjectterms() call, passing in the retrieved magazine IDs. This WordPress Stack Exchange question explains the issue well; also see this WordPress core trac ticket.
This plugin adds support for a posttypes argument for WPTermQuery-getterms()/getterms() and a GET param on REST endpoints for taxonomies registered with showinrest enabled.
Installation/setup ##
Simply install and activate this plugin, and follow usage instructions below. No further plugin configuration is required, but please review the "Things to keep in mind" section below before utilizing this plugin in a production environment.
Usage ##
Usage with getterms() ###
When retrieving ter
Read the full README on GitHub →
Releases
These releases are tags only. The author does not attach a packaged zip, so there are no download counts to report.