0

I use this code for show updated post. (if post updated show this image).

 <?php if (get_the_modified_time('U') > get_the_time('U')) { ?>
 <img class="update" src="<?php bloginfo('template_url'); ?>/images/update.png" alt="Updated">

Now i want after 5 day this "Updated image" deleted from post. and when i again update post this image again add to post ...(repeat this action).

How do this ?

thanks

1 Answers1

0

You can use date_diff() function for finding days difference between 2 dates. Please refer reference link for further details...

Let me know if I can help you further....

WildProgrammers
  • 358
  • 1
  • 7
  • This code for difference between 2 dates .how delete after x day and again add when i updated post in wordpress !? – Shidoox Man Apr 17 '17 at 19:21