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/dipskakadiya/wp-primary-term/archive/refs/heads/master.zipNo built-in updater. New versions won't appear under Dashboard → Updates. Install new releases yourself, or let Git Updater track the repository.
WordPress Primary Term
Allows you to choose primary term for posts and custom post types.
Description
Allows you to choose primary taxonomy for posts and custom post types.
This plugin only work with WordPress Classic Editor.
Installation
1. Add the plugin's folder in the WordPress' plugin directory.
2. Activate the plugin.
3. Now you will have the ability to make any term a primary term for the post
Developers' Notes
if you want to filter post and custom post types based on their primary categories.
For primary term query, Meta key will be primary
Ex For Category filter key will be primarycategory
Template functions
Get a post Primary term link
wpptgettheprimaryterm( $taxonomy, $id, $before, $after );
$taxonomy : Taxonomy name.
$id : Post ID or post object. Defaults to global $post [ Optional ] .
$before : Before link [ Optional ].
$after : After link [ Optional ].
Get a post Primary term object
wpptgetprimaryterm( $taxonomy, $id );
$taxonomy : Taxonomy name.
$id : Post ID or post object. Defaults to