Showing all posts in 'video' format on page – what's wrong with my query?
-
Hi,
I’m trying, on one page of my site, to show only posts which are saved in the ‘video’ post format (I know this is not the ideal taxonomy for this, but I’m working with a legacy site and I can’t really change it). My theming skills are very very rusty, and I’ve been attempting to do it with taxonomy queries but whatever I do it seems to show every post in the archive regardless of format, rather than only the video format ones. What’s wrong with my code, and what do I need to change?
<?php $args = array( 'tax_query' => array( array( 'taxonomy' => 'post_format', 'field' => 'slug', 'terms' => 'post-format-video' ) ) ); query_posts(); while ( have_posts() ) : the_post(); the_content(); endwhile; // End of the loop. ?>
Viewing 4 replies - 1 through 4 (of 4 total)
Viewing 4 replies - 1 through 4 (of 4 total)
- The topic ‘Showing all posts in 'video' format on page – what's wrong with my query?’ is closed to new replies.