WP Primary Term
Allows you to choose primary taxonomy for posts and custom post types.
by dipesh.kakadiya<dipesh.kakadiya111@gmail.com> · github.com/dipskakadiya/wp-primary-term · website
★ 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/dipskakadiya/wp-primary-term/archive/refs/heads/master.zipFrom the readme
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