Query post by post format, I've tried everything
-
I’m missing something & I can not get this to work. I’m trying to query posts that are in the Standard format for one page, and posts that are not in the standard format for another page.
Here’s my code:
$args = array( 'showposts' => 10, 'tax_query' => array( array( 'taxonomy' => 'post_format', 'field' => 'slug', 'terms' => 'post-format-standard', 'operator' => 'IN' ) ) ); $wp_query = new WP_Query($args);
I’ve googled this a few times and came up with the same answer each time, ‘tax query’, though I can not get it to work for me so maybe somebody here can point out what I’m missing
-Jake
[ Please do not bump, that’s not permitted here. ]
- The topic ‘Query post by post format, I've tried everything’ is closed to new replies.