[Support request] How to show hour, minutes & seconds in published time?

Home Forums Support [Support request] How to show hour, minutes & seconds in published time?

Home Forums Support How to show hour, minutes & seconds in published time?

  • This topic has 16 replies, 4 voices, and was last updated 6 months ago by Ravi Dixit.
Viewing 15 posts - 1 through 15 (of 17 total)
  • Author
    Posts
  • #2343720
    Ravi Dixit

    Hello, Team!

    I want to know how can I show published time as hours, minutes, or seconds ago when the published time is less than 1 day. It should only work for posts which have a published time of fewer than 24 hours. else other posts should show the normal dates.

    Please check this example https://prnt.sc/q_JTdGBLoAvy

    Also, I want this for the modified date. I have my single post header created using the Elements in GeneratePress. Used the post date as the Updated date. Please let me know how can I make the above changes.

    #2343984
    David
    Staff
    Customer Support
    #2344059
    Ravi Dixit

    This plugin will change for all the posts, but I want the changes for only posts published or updated less than 24 hours ago. All other posts should show the same format date.

    #2344081
    Ying
    Staff
    Customer Support

    It looks like there’s an option in the plugin to apply to posts published in a specific time frame.

    Maybe try to contact plugin support?

    #2344102
    Ravi Dixit

    Yes, I just installed the plugin and found the option as well. But after activating the plugin, my post updated time is not showing after the post title. It is completely hidden.

    I selected 1 day in “Apply to posts not older than” so the latest posts published or updated less than 24 hours ago not showing the date and older posts are showing the date correctly.

    #2344107
    Ying
    Staff
    Customer Support

    Can you link us to a recently published post where I can see the issue?

    #2344117
    Ravi Dixit

    I have shared the link in the Private information field. Also you can visit the old posts on the same site to see they are showing the date.

    #2344129
    Ying
    Staff
    Customer Support

    Hum, I just tested on my end, and it doesn’t seem to have this issue.

    Can you provide admin login so we can take a look at the backend?

    #2344149
    Ravi Dixit

    Sure, I have shared the access through the private field.

    #2344216
    Ying
    Staff
    Customer Support

    It’s because you are using the updated date as the date, but the recent post doesn’t have an updated date, it only has the published date.

    Try change the date settings in the single post hero block element, like this:
    https://www.screencast.com/t/MxRCpsB77

    #2344231
    Ravi Dixit

    I made the changes aw you suggested but still not working.

    Pages are not showing the time as I wanted, they are showing the date.

    Also, some posts are showing hours ago time on the homepage if you scroll down to Cricket News Category, but when I open them, they show the date.

    Also, I tried updating a post to check but it did not work.

    #2344236
    Ying
    Staff
    Customer Support

    Have you cleared the cache?

    #2344245
    Ravi Dixit

    Yes, I did!

    #2344261
    Ying
    Staff
    Customer Support

    Ah, the date has to be inside the loop, otherwise, the plugin would not detect the date.

    You’ll have to change the hook from after header to before content.

    #2344419
    Ravi Dixit

    I am not able to find the hook, can you share where I can find it?

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