limit multiple categories tax_query by tag not working
-
Displaying posts that are tagged with ‘resource’. The following code is working great…
$querystring = array( 'cat' => 'category__in => array('.$cat.','.$topic.')', 'posts_per_page' => -1, 'tag' => 'resource', 'paged' => ( get_query_var('paged') ? get_query_var('paged') : 1 ), );
However this code is working but not honoring the ‘resource’ tag…
$pagesorter['tax_query'] = array( 'tag' => 'resource', 'posts_per_page' => -1, array( 'taxonomy' => 'category', 'terms' => $cat, 'field' => 'id', ), array( 'taxonomy' => 'category', 'terms' => $topic, 'field' => 'id', ), );
How do I get the above piece of code to honor the posts that are tagged ‘resource’? I am sure I have something out of order or wrong. I have tried putting it within each array with no luck as follows.
$pagesorter['tax_query'] = array( 'posts_per_page' => -1, array( 'taxonomy' => 'category', 'terms' => $cat, 'field' => 'id', 'tag' => 'resource', ), array( 'taxonomy' => 'category', 'terms' => $topic, 'field' => 'id', 'tag' => 'resource', ), );
Any thoughts, ideas and help would be greatly appreciated! Thanks for your time everyone!
Viewing 2 replies - 1 through 2 (of 2 total)
Viewing 2 replies - 1 through 2 (of 2 total)
- The topic ‘limit multiple categories tax_query by tag not working’ is closed to new replies.