Created
December 4, 2012 22:45
-
-
Save JustinSainton/4209762 to your computer and use it in GitHub Desktop.
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 = array( | |
'meta_key' => '_cs-expire-date', | |
'orderby' => 'meta_value_num', | |
'order' => 'ASC', | |
'meta_query' => array( | |
array( | |
'key' => '_cs-expire-date', | |
'value' => time(), | |
'compare' => '>=', | |
'type' => 'DATE' | |
) | |
) | |
); | |
$event = new WP_Query( $args ); | |
?> | |
<?php if ( $event->have_posts() ) : ?> | |
<?php while ( $event->have_posts() ) : $event->the_post(); ?> | |
<?php | |
/* Include the Post-Format-specific template for the content. | |
* If you want to overload this in a child theme then include a file | |
* called content-___.php (where ___ is the Post Format name) and that will be used instead. | |
*/ | |
get_template_part( 'content', get_post_format() ); | |
?> | |
<?php endwhile; ?> | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Hi Justin, i can´t get this to work in my query, does it this code work or is just for me?