Created
January 19, 2014 14:58
-
-
Save coreyweb/8506007 to your computer and use it in GitHub Desktop.
Check post date in a WordPress post and establish rules for before and after a certain date
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 | |
if (strtotime($post->post_date) > strtotime('January 01 2014')) { | |
// this is a newer post | |
} else { | |
// this is an older post | |
} | |
?> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment