Template for all categories of a custom post type?

The name you are using for taxonomy isn’t allowed. register_post_type() $taxonomy parameter says $taxonomy (string) (required) The name of the taxonomy. Name should only contain lowercase letters and the underscore character, and not be more than 32 characters long (database structure restriction). Default: None So, you need to change the name cat-listings to something else( … Read more

How to get the intersection of two terms both from different custom taxonomies

The custom query to get custom post type posts filtered by 2 different terms from 2 different taxonomies will be: $args = array( ‘post_type’ => ‘listing’, ‘tax_query’ => array( ‘relation’ => ‘AND’, array( ‘taxonomy’ => ‘job_listing_region’, ‘field’ => ‘slug’, ‘terms’ => ‘himalyan’, // this can be an array of terms also ), array( ‘taxonomy’ => … Read more

multiple taxonomy select display only one in front end

add a loop to display all taxonomy : if (2 > count($locations)) { echo ‘<strong>Location:</strong> ‘.$locations[0]->name.'<br>’; } else { echo “<strong>Location:</strong>”; echo “<ul>”; foreach ($locations as $l) { echo “<li>”; echo $l->name; echo “</li>”; } echo “</ul>”; } . other loop with all location on the same line $stack = array(); foreach ($locations as $l) … Read more