Site logo

Archived topic

How to change the updated time of the blog articles?

7 replies · Started by Paul on October 18, 2020

Viewing posts 1–8 of 8

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

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

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.

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 ?

Hi there,

yes that is ok

ok, thanks

No problem. :)

This archived topic is closed to new replies.