Create Advanced search with taxonomies (not filter list)

like other times, after posting here i found my own question. Maybe its not the smarter solution but its working for me. Im using the new tax_query as commented in http://www.wpmods.com/query-multiple-taxonomies-in-wp-3-1/ Basically if i get 2 taxonomies with two terms for example $job_type=”full-time+free-lancer”; $job_cat=”designer+programmer”; I do the following: $custom_query=false; $myquery[‘tax_query’] = array( ‘relation’ => ‘AND’); … Read more

WP_Query on custom taxonomy works fine but fails if run through wp_ajax_

I don’t see your call to the ajaxurl in your code. Are you actually getting an ajax response? Try this javascript: jQuery(document).ready( function($) { $(“a.getviews”).click( function() { var td = $(this).parent(); /* only fetch results once */ $(this).unbind(‘click’).bind(‘click’, function(){return false;}); // replace button with loader $(td).html(‘<span class=”loader”></span>’); $.ajax({ type: ‘POST’, url: ajaxurl, data: { action: … Read more

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 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

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)