Exclude Custom Post Type from shared Custom Taxonomy

You could try using the terms_clauses filter function wpse156370_terms_clauses( $pieces, $taxonomies, $args ) { global $wpdb; $pieces[‘fields’] .= $wpdb->prepare( ‘, (SELECT COUNT(*) FROM ‘ . $wpdb->posts . ‘ p, ‘ . $wpdb->term_relationships . ‘ p_tr’ . ‘ WHERE p_tr.object_id = p.ID AND p_tr.term_taxonomy_id = tt.term_taxonomy_id’ . ‘ AND p.post_status = %s AND p.post_type = %s) … Read more

list of tags overlay

Notice that the strip_tags() will remove all HTML tags. If you want to allow <br>, then you can add it as the second input parameter: echo strip_tags( $text, ‘<br>’ ); I want to display them like a list For that case, you could try this example: <p class=”nom”> <ul> <?php the_terms( get_the_ID(), ‘project_tag’, ‘<li>’, ‘</li><li>’, … Read more

Display taxonomy term slugs

You code is completely wrong. array_shift should not be used array_shift() shifts the first value of the array off and returns it, shortening the array by one element and moving everything down. All numerical array keys will be modified to start counting from zero while literal keys won’t be touched. You should have a look … Read more