Web Hosting
  1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

WordPress fix Reply To: Update Modified date when scheduled posts get published

Discussion in 'Misc WordPress Requests' started by moltenice, Nov 1, 2017.

  1. moltenice

    Guest

    Reply To: Update Modified date when scheduled posts get published, by moltenice

    Ah apologies, I probably meant to post it in developing with WordPress. Do let me know if I should make this question on the developing with WordPress section instead.

    The reason is that the date I display for my posts and the date I sort posts by in the blog view is with the modified date not the post date. The problem with this, of course, is that the date shown on my website is much earlier than the date it was actually published since I show modified date. It also gets sorted wrong due to the older modified date.

    Furthermore, I use a plugin that uses the published date and modified date to provide structured data for the post page automatically. And with the plugin, the structured data shows dateCreated as newer than dateModified, which is wrong as well I believe.

    Anyways, I guess the main thing I care about is making the modified date set to now as soon as a scheduled post gets published. Basically marking a post being changed from scheduled status to published status as a “modified action”. Ideally if you can provide an example function I can put into functions.php, it would be much appreciated!

    Reply To: Update Modified date when scheduled posts get published
     
    #1

Share This Page

Web Hosting