get_the_terms issue

First of all, what is $post? If you after the global $post, then you have to declare the global in the function. So on the second line you’ll need to put global $post;. Secondly, $term is an object. If you are after the term’s name, use $term->name, for it’s slug $term->slug. See the Codex for … Read more

Check if term is in a taxonomy?

You’re probably looking for term_exists(): <?php term_exists( $term, $taxonomy, $parent ); ?> $term is required (obviously). Both $taxonomy and $parent are optional, but if you want to determine if a specific taxonomy has a given term, just pass the registered taxonomy name via the $taxonomy parameter.

meta_key & meta_value not working with get_pages and custom taxonomy

Custom taxonomies are not meta values, but rather their own thing. I don’t think wp_list_pages() or get_pages() can query based on a taxonomy, so I’d recommend using WP_Query instead: <?php $relevant_pages_args = array( ‘post_type’ => ‘page’, ‘posts_per_page’ => -1, ‘post_parent’ => 65, ‘tax_query’ => array( array( ‘taxonomy’ => ‘relevance’, ‘field’ => ‘slug’, ‘terms’ => ‘alumni’ … Read more

Custom Taxonomy Tag Search

One plugin that I’ve used successfully is Relevanssi: http://wordpress.org/extend/plugins/relevanssi/ Also, you could try to make your custom taxonomy into a search filter, like it’s described in this post: http://wordpress.org/support/topic/search-form-with-custom-taxonomy-dropdown . I’ve used this on my projects and it worked wonders! Hope this helps!

Custom Taxonomy template not showing

Okay, I feel quite silly, but what it comes down to is you can’t have a custom post type and custom taxonomy with the same name. (Well… you can, but your taxonomy templates won’t work) In my case I changed my content type to “product” and my taxonomy to “products”. This fixes everything along with … Read more

custom taxonomy relationship

Taxonomies can be shared among multiple post types, but if you’re looking for post types relationships, you can try using the Types plugin (free) with the Views plugin (premium) or code the functionality from Types. I’ve just started playing around with this and it enables easy creation of relationships between post types. Their example: you … Read more

Custom Post Type Taxonomies -Posts not showing in Category or Tag pages

You were close with the code you posted in your comment. The issue is that you only tested for is_main_query, which will limit every query on your site to that single post type. function wpa82763_custom_type_in_categories( $query ) { if ( $query->is_main_query() && ( $query->is_category() || $query->is_tag() ) ) { $query->set( ‘post_type’, array( ‘post’, ‘resource’ ) … Read more