Last active
June 11, 2018 11:07
-
-
Save ScarletPonytail/91be541958ea8357d6ade1985058a37e to your computer and use it in GitHub Desktop.
Wordpress - Date range for wp_query loop
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 | |
$mostloop = new WP_Query( | |
[ | |
'post_type' => 'post', | |
'post__in' => explode( ',', $settings->ins_mv_suggest ), | |
'posts_per_page' => 12, | |
'date_query' => [ | |
'column' => 'post_date_gmt', | |
'after' => '3 months ago', | |
'inclusive' => true, | |
], | |
] | |
); | |
?> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment