Show related posts that match two categories

This seems a little tricky since you seem (ab)use native Category for things that aren’t quite the same (Villa and Housekeeper). You will probably need to write a custom logic since WP won’t just “get” the bit that if you are on one specific category (Villa) you want to query for another (Housekeeper). As for … Read more

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

A way to query custom taxonomies by name

You can add a search field to get_terms arguments, which will have wildcards added by WordPress automatically: $args = array( ‘hide_empty’ => false, ‘search’ => $searched_term, ); get_terms(‘hotellocation’, $args); This is documented about mid-way down the page here. There are also other similar arguments you could use, such as name__like, if search doesn’t work for … Read more