Created
August 28, 2015 15:08
-
-
Save bepatrickdavid/8f67621b7a01f999216a to your computer and use it in GitHub Desktop.
ACF: get post order by date picker
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 $news = get_posts(array( | |
'post_type' => 'post', | |
'post_status' => 'publish', | |
'meta_key' => 'data_evento', //nome custom field | |
'orderby' => 'meta_value_num', | |
'order' => 'DESC', | |
'posts_per_page' => 12, | |
'cat' => '3' | |
)); ?> | |
<?php foreach($news as $nw): ?> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment