Created
October 23, 2019 13:44
-
-
Save mgibbs189/c4c91aee9108bc29fff7e34424c5e5f2 to your computer and use it in GitHub Desktop.
FacetWP - recent posts for a specific post format
This file contains 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
<?php | |
$args = [ | |
'posts_per_page' => 10, | |
'tax_query' => [ | |
[ | |
'taxonomy' => 'post_format', | |
'field' => 'slug', | |
'terms' => 'post-format-link' | |
] | |
] | |
]; | |
$recentPosts = new WP_Query( $args ); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment