I'm trying to add to this if statement another one that checks if post time is before a specific date (let's say 14th March 2014..).
<?php if (in_category('5')) {
echo 'something'; }
?>
I tried with this but it's echoed even on posts newer than that date
<?php
$date1 = "2014-03-14";
$date2 = $post->post_date;
if ( (in_category('5')) && ($date1 < $date2) ) {
echo 'something';
}
?>