• I have a post scheduled to go out 1 week from now. I made the change today to schedule it and let it be.

    When it finally gets published, the post date is the date it was scheduled to be published. But the modified date is still 1 week earlier!

    How do I make it so that as soon as a scheduled post gets published it updates the modified date to the post date (or to now)? I’ve made my post page display date modified instead of post date so that’s why it’s important to me.

Viewing 2 replies - 1 through 2 (of 2 total)
  • Try to do it with this code:

    
    <?php the_modified_date('M j, Y'); ?>
    

    Put it wherever you need it. It is supposed to work “only” inside/within the the loop but I’m currently using it outside of it, and it still working great.

    For more info, visit the official documentation for WordPress(codex):
    The modified date function

    Note: You can format the date however you want.

    • This reply was modified 7 years, 4 months ago by kirasiris. Reason: Link was not working
    Thread Starter moltenice

    (@moltenice)

    Hey, thanks for that info! I am already using that to display it.

    The question isn’t about how to display it, it’s to UPDATE it for a given scheduled post when it is published automatically!

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Update Modified date when scheduled posts get published’ is closed to new replies.