Difference in days to take actions
-
Hello.
I need to know the difference in days between current day and post date, not to display it but to take an action when it is older than 7 days.
Example:
If (current_time(‘mysql’) – get_the_time( ‘Y-m-d’ ) > 7days){echo “This post is old”;}
I can’t find how to make it.Thanks in advance.
Viewing 1 replies (of 1 total)
Viewing 1 replies (of 1 total)
- The topic ‘Difference in days to take actions’ is closed to new replies.