WP_Query tax_query in plugin
-
Hi there,
I’m attempting to write a plugin, I’m using WP_Query and am trying to do a simple tax query with the following arguments:
$args = array( 'posts_per_page' => -1, 'post_type' => 'event', 'tax_query' => array( array( 'taxonomy' => 'event_type', 'field' => 'slug', 'terms' => ‘carnival’, ), ), );This works fine in my theme and returns the relevant results, but in my plugin it doesn’t seem to return any results.
Any help would be greatly appreciated.
Many thanks,
Chris
Viewing 3 replies - 1 through 3 (of 3 total)
Viewing 3 replies - 1 through 3 (of 3 total)
The topic ‘WP_Query tax_query in plugin’ is closed to new replies.