Created
March 6, 2010 05:22
-
-
Save hunk/323514 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 | |
//The Query | |
// exactly than | |
query_posts('meta_key=start_date&meta_value='.date("Y-m-d")); | |
// or | |
// dates less than | |
// query_posts('meta_key=start_date&meta_compare=<=&meta_value='.date("Y-m-d")); | |
// or | |
// date mayor than | |
// query_posts('meta_key=start_date&meta_compare=>=&meta_value='.date("Y-m-d")); | |
//The Loop | |
if ( have_posts() ) : while ( have_posts() ) : the_post(); | |
echo the_title(); | |
echo "<br />"; | |
endwhile; else: | |
endif; | |
//Reset Query | |
wp_reset_query(); | |
?> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Hi Hunk
Could you help me.
Im using magic field on my custom wordpress template
I try filter my qurey base on magic field checklist, but doesnt work. could you point me which part i missed
Thanks