Created
April 23, 2014 13:46
-
-
Save ivandoric/11215753 to your computer and use it in GitHub Desktop.
wordpress: Filter posts by comparing meta value
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 | |
$trenutnovrijeme = strtotime('now'); | |
query_posts( array( | |
'post_type' => 'javna-nadmetanja', | |
'orderby' => 'wpcf-datum-objave', | |
'meta_key' =>'wpcf-datum-zatvaranja', | |
'meta_compare'=>'>' , | |
'meta_value' => $trenutnovrijeme, | |
'order' => DESC, | |
'showposts' => 10, | |
'paged' => get_query_var('paged') ) ); ?> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment