[Resolved] How to change the updated time of the blog articles?

Home Forums Support How to change the updated time of the blog articles?

Viewing 8 posts - 1 through 8 (of 8 total)
  • Author
    Posts
  • #1495029
    Paul

    Are there any ways to change the updated time of the blog articles from generatepress theme customizer?

    For example: I published a new blog article on September 30, 2020, but i added new contents based on the old one on Oct 19/, then here it(https://prnt.sc/v22w23) will show the new date (October 19,2020) ,

    where do I make some settings on customizer or extra CSS?

    thanks in advance
    regards

    #1495033
    Elvin
    Staff
    Customer Support

    Hi,

    I believe this may help you w/ what you’re trying to do.
    https://docs.generatepress.com/article/show-the-updated-post-date/

    A wise man once said:
    "Have you cleared your cache?"

    #1495046
    Paul

    HI,
    Thanks for quick reply.

    i checked the link you send me, there are two ways included:

    one is to just copy and add the CSS code to Appearance, Customize, Simple CSS

    .posted-on .updated {
    display: inline-block;
    }

    .posted-on .updated + .entry-date {
    display: none;
    }

    second is to just add header element

    function post_modified_date() {
    return get_the_modified_date();
    }
    add_shortcode( ‘modified_date’, ‘post_modified_date’ );

    I can choose any one for this .

    Im sorry that what is that? https://prnt.sc/v2382c

    regards

    #1495218
    Elvin
    Staff
    Customer Support

    My bad. The previous one was for adding the updated time on page headers.

    I think this is the better fit for what you’re trying to do.
    https://docs.generatepress.com/article/generate_post_date_output/#only-show-updated-date

    Im sorry that what is that? https://prnt.sc/v2382c

    That is for when you want your date to have a “Last Updated” label before it.

    And to be able to do that on blog posts, this is the proper css:

    .posted-on .updated-date:before {
        content: "Last Updated: ";
    }

    What this will do is display your updated date in “Last Updated: October 19, 2020” instead of just the date.

    A wise man once said:
    "Have you cleared your cache?"

    #1495249
    Paul

    hi

    i directly copy this code

    .posted-on .updated {
    display: inline-block;
    }
    .posted-on .updated + .entry-date {
    display: none;
    }

    to simple CSS, then published, then the blog articles will show the latest updated time.

    it is also ok ?

    #1495440
    David
    Staff
    Customer Support

    Hi there,

    yes that is ok

    #1495484
    Paul

    ok, thanks

    #1496125
    Elvin
    Staff
    Customer Support

    No problem. 🙂

    A wise man once said:
    "Have you cleared your cache?"

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