Created
August 10, 2020 16:17
-
-
Save joseph-farruggio/e79247d6a0180cd90a145e33c15ccb80 to your computer and use it in GitHub Desktop.
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
<?php | |
$category = get_field('category'); | |
// query arguments | |
$args = array( | |
'category__in' => $category->term_id; | |
'post_status' => 'publish', | |
'posts_per_page' => 10, | |
'orderby' => 'date', | |
) | |
$the_query = new WP_Query( $args ); | |
// Run your query through the loop |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment