I need a way to inform visitors if the post published date or modified date is older than 1 year and if so, display a message on the post page.
I have added an code to my content-single.php
file, but without the desired results in terms of checking against both published and updated time.
Example:
if (strtotime($post->post_date) < strtotime('-1 year')){
echo 'Old Post';
} else {
echo 'Not Old Post';
}
Any ideas as I'm in the dark here..