Site logo

Archived topic

Published and Updated date at the bottom of the content

3 replies · Started by Chitika on October 6, 2020

Viewing posts 1–4 of 4

I would like to display published and updated date at the bottom of the content.
I should be able to customize the message to display them.

If both are equal, they should not be displayed, otherwise show them.

Hi there,

Are you referring to single posts here?

If so activate it in the customizer:
https://docs.generatepress.com/article/blog-content-layout/#single

And move it to the bottom with this PHP snippet:

add_filter( 'generate_footer_entry_meta_items ', function( $items ) {
    if ( is_single() ) {
        $items = array(
            'date',
        );
    } return $items;
} );

Adding PHP: https://docs.generatepress.com/article/adding-php/

Reference: https://docs.generatepress.com/article/generate_footer_entry_meta_items/

Then use this CSS solution:
https://docs.generatepress.com/article/show-the-updated-post-date/

Adding CSS: https://docs.generatepress.com/article/adding-css/

I would like a similar message -

This post was published on <published date> and has been modified on <updated date>.

How can I do this.

I'm not sure whether the above code does it in single line.

Can you apply the solution above first and we can tweak it from there?

This archived topic is closed to new replies.