How can i display a taxonomy? i have created a plugin and then a custom type. and a taxonomy , also i have register it

Try this one in your theme custom page or debugging page: <?php $args = array( ‘post_type’ => ‘offer’, ‘posts_per_page’ => -1 //show all posts ); $loop = new WP_Query($args); if($loop->have_posts()){ while($loop->have_posts()){ $loop->the_post(); $id = get_the_ID(); $tax = get_the_terms($id, ‘hotel’); print_r($tax); }//endwhile wp_reset_postdata(); }//endif

Automatically add custom taxonomy to posts in a category

You’ll want to hook onto the wp_insert_post action. Once the new post is created, you can then assign it to the taxonomy/term you wish. It might look something like this: add_action(‘wp_insert_post’, function($postId, $post, $updatingExisting) { if( $updateExisting ) return; // read up on these params at http://developer.wordpress.org/reference/functions/wp_set_post_terms/ wp_set_post_terms( $postId, ‘main_podcast’, ‘qtserie’, true); }, 10, 3); … Read more