simple tax_query intersection

As jdm2112 and SallyCJ said in the comments, the query lacks of ‘field’ => ‘slug’. So: ‘tax_query’ => [ ‘relation’ => ‘AND’, [ ‘taxonomy’ => ‘link-category’, ‘terms’ => $link, ‘field’ => ‘slug’ ], [ ‘taxonomy’ => ‘despacho’, ‘terms’ => $despacho, ‘field’ => ‘slug’ ], ],

Passing form inputs into multi-taxonomy query

You mention that with your first attempt you get the URL http://sitename.com/?brand=22 which is correct as you’ve used a get method, but you don’t say what code you’re using for the query. Personally I use this for my form and would agree with wdalhaj to use post instead of get <form id=”brandsearch” method=”post” action=””> <select … Read more

Modify users.php query with multiple taxonomies

Because I’m also storing the user IDs against each company, office and team post object as user taxonomy I can reverse the query and only include the user IDs assigned to that specific post object. A similar thing to what has been done here – http://mywebsiteadvisor.com/learning/tutorials/building-simple-groups-plugin-for-wordpress-tutorial/step-5/ Only I’ve modified it to be a bit more … Read more

Combining categories (Query posts with multiple taxonomy terms)

This type of behavior is documented in the WP_Query documentation. You can use a comma-separated list of category IDs instead of just one. For example (ripped right off the Codex page): $query = new WP_Query( array( ‘cat’ => ‘2,6,17,38’ ) ); With tags it’s a little different, but not too much so: $query = new … Read more

How do I display the grand child items of a taxonomy term?

I managed to answer this question myself by adding get_queried_object()->term_id; instead of the taxonomy terms ID. It now outputs all the grandchild taxonomy terms for the current taxonomy term. Here is my updated working code: $term_id = get_queried_object()->term_id; $taxonomy_name=”product_range”; $term_children = get_term_children( $term_id, $taxonomy_name ); echo ‘<ul>’; foreach ( $term_children as $child ) { $term … Read more

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