Get Posts Under Custom Taxonomy

Your tax query is incorrect, field should be the field you want to query on: term_id, name, or slug – $posts_array = get_posts( array( ‘posts_per_page’ => -1, ‘post_type’ => ‘fabric_building’, ‘tax_query’ => array( array( ‘taxonomy’ => ‘fabric_building_types’, ‘field’ => ‘term_id’, ‘terms’ => $cat->term_id, ) ) ) );

Permalink help with default Posts and custom Taxonomy

This is what we ended up coming up with that seems to work. I’m not sure if it’s the best or right approach but it seems to do the trick. Anyone forsee any problems with this route? //Re-register default post type for rewrite purposes. function zbt_reregister_post() { register_post_type( ‘post’, array( ‘labels’ => array( ‘name_admin_bar’ => … Read more

Is there a template file to list all terms of a given custom taxonomy?

You can include the same file in template-composers-terms.php and template-interprets-terms.php like that : <?php /* Template Name: List of composers */ $tax = “composer”; require “include/file_which_does_all_the_work.php”; and if the page slug is the same that the taxonomy slug, you can save the line $tax = … with that in the included file : $tax = … Read more