How to show terms used only for particular custom post type. Filter creation perpose

You need to send param post_id in ajax of data. Then in your plugin parse it and and search by taxomony. My simple example: <?php // in ajax handler // get post_id from requst data $post_id = filter_var($_POST[‘post_id’], FILTER_VALIDATE_INT); // find post $post = get_post($post_id); But before you need register the taxomony. register_taxonomy(‘auto’, array($post->post_type), array( … Read more

Linking Taxonomies

When you register your custom post type you can set which taxonomies will be registered for this post type. So you can register your custom ‘Course’ taxonomy and the built-in ‘Category’ taxonomy with your custom post type ‘Tutorials’. And posts will just be registered with ‘Category’. function tutorial_setup_post_type() { $args = array( ‘public’ => true, … Read more