sdjentertainment
Member
Posted 2 years ago #
Hey Hey,
I'm doing this side projects and using the mighty wordpress for it. The content is going to get updated regularly and would like to display a "new" icon for everything posted that day.
Was wondering if anyone new how to set up a ifelse statement so I can check if the current date equals the post date and if so do something and if it doesn't do nothing.
Anything would help and thanks for taking time.
Cheers,
Simon
Have you seen this post? http://wordpress.org/support/topic/313756
I think you could do this:
<?php if (strtotime($post->post_date) > strtotime('-1 days')): ?> <b>NEW</b> <?php endif; ?>
And that would do today. I think.
sdjentertainment
Member
Posted 2 years ago #
Thanks grand,
I don't have time to test it out today, but once I do I'll post the solution
Thanks for taking the time.