[Support request] Glitch in post updated date code

Home Forums Support [Support request] Glitch in post updated date code

Home Forums Support Glitch in post updated date code

Viewing 13 posts - 1 through 13 (of 13 total)
  • Author
    Posts
  • #898203
    Deep

    Hi,
    I have followed this article on your site https://docs.generatepress.com/article/generate_post_date_output/#only-show-updated-date to show the updated date for the posts on my site.
    Well, the code is working partly in my case. As soon as I updated the code in the functions.php file it was showing the updated date of the post. But I have an issue in this regard:
    After inserting the code, I noticed that the articles which I scheduled for a future date, on publishing the single post pages are displaying the date of preparing the post and not the publishing date.
    I think the code mentioned in the article above should display the date of publishing or the date of update whichever is later.
    Otherwise for example, if I schedule a post to be published after one week, on publishing it would display a date seven days back of publishing.
    Hope you understand my point. Thanks.

    #898229
    Leo
    Staff
    Customer Support

    Hi there,

    So I assume you are using a special plugin or function for schedule updates?

    #898857
    Deep

    Sorry I am not using any post scheduler plugin. I am simply using the WordPress post schedule function. Hope you got it.

    #900455
    Deep

    Hi, I am still waiting for your solution. Thanks

    #900458
    Leo
    Staff
    Customer Support

    Oops somehow we didn’t get a notification for the previous reply.

    I’ve forwarded this to Tom πŸ™‚

    #900773
    Tom
    Lead Developer
    Lead Developer

    Hi there,

    That almost sounds like a WordPress bug. Can you try deactivating your other plugins to rule out a conflict?

    #901734
    Deep

    Hi Tom,
    I tried deactivating all the plugins to check whether its a plugin conflict or not. I found that nothing was interfering and may the code misses some lines.
    So far as WordPress bug is concerned, I would rule out such a possibility. Because prior to using GeneratePress theme I was working on Divi theme where I made such code changes with the support of the technical team to show the post modified date or post publishing date whichever is later in the single post page.
    So I think you should have look at the code so that it behaves properly.

    See the screenshots
    http://prntscr.com/npgwf7 (it shows the publishing date in the WP backend)
    http://prntscr.com/npgy36 (it shows the date of creating the post i.e. May 12, 2019 and not the date of publishing i.e. May 13, 2019)

    Hope you will resolve the issue soon. Thanks.

    #902014
    Tom
    Lead Developer
    Lead Developer

    I’ll see if I can reproduce the issue. I’ll get back to you ASAP πŸ™‚

    #905484
    Deep

    Hi Tom,
    Hope you are working on the problem. I would appreciate if you come up with an early solution in this regard.
    Thanks

    #905630
    Tom
    Lead Developer
    Lead Developer

    Hi there,

    It’s a long weekend here, so I’m away from the main (coding) computer. I’ll be back in the office tomorrow morning and will debug this fully πŸ™‚

    Thanks!

    #907140
    Tom
    Lead Developer
    Lead Developer

    Just playing with this now.

    After inserting the code, I noticed that the articles which I scheduled for a future date, on publishing the single post pages are displaying the date of preparing the post and not the publishing date.

    How are you viewing a post which is scheduled for a future date? Are you previewing it? If so, the function is likely doing the correct thing in showing you the date as it will be once you publish.

    #909283
    Deep

    Hi,
    I haven’t got your point. See when I preview a post (that I scheduled for a future date) before publishing it shows the date of creating the post. Before publishing its ok.
    But once the post is published, it should show the date of publishing rather than the date of creation of the post (it might be two weeks back from the date of publishing). Hope you would agree with me on this point.

    #909392
    David
    Staff
    Customer Support

    Hi there,

    haven’t tested but found this which seems to be the same issue:

    https://wordpress.stackexchange.com/questions/284048/update-modified-date-when-scheduled-posts-get-published

Viewing 13 posts - 1 through 13 (of 13 total)
  • You must be logged in to reply to this topic.