Query Terms by Post Type WP Registry grade A. No security issues foundWP RegistryNo security issues foundOpen the reportA
WordPress plugin that adds options for filtering taxonomy term retrieval by post types with assigned terms.
★ 0stars
1composer installs
v1.0.1latest · 3 years ago
Install
This is the repository archive. It installs, but the folder name will carry the branch suffix and updates will not flow.
Install straight from GitHub with WP-CLI:
wp plugin install https://github.com/ucf/query-terms-by-post-type/archive/refs/heads/main.zipOn Packagist as ucf/query-terms-by-post-type:
composer require ucf/query-terms-by-post-typeNo built-in updater. New versions won't appear under Dashboard → Updates. Install new releases yourself, or let Git Updater track the repository.
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
Releases
2 releases.
These releases are tags only. The author does not attach a packaged zip, so there are no download counts to report.