Created
June 30, 2011 18:52
-
-
Save collegeman/1056904 to your computer and use it in GitHub Desktop.
Compare post date to cut off date (for layouts)
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 | |
$postDate = strtotime( $post->post_date ); | |
$oldDate = strtotime( '2011-06-29' ); | |
if ( $postDate > $oldDate ) { | |
echo 'do the new thing'; | |
} else { | |
echo 'do the old thing'; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment