Last active
August 29, 2015 14:00
-
-
Save LeahArmstrong/11270483 to your computer and use it in GitHub Desktop.
Wordpress Loop Query for filtering posts by format-type
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$args = array ( | |
'pagination' => false, | |
'posts_per_page' => '3', | |
'ignore_sticky_posts' => true, | |
'post_type' => 'post', | |
'tax_query' => array( | |
array( | |
// Specifies post-format taxonomy type | |
'taxonomy' => 'post_format', | |
'field' => 'slug', | |
// Defines term/s to query using 'post-format-*' | |
'terms' => 'post-format-video', | |
// The operator allows you to exclude posts of that format type | |
'operator' => 'NOT IN' | |
) | |
) | |
); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment