Site logo

[Support request] Display last updated date on blog posts

Home Forums Support [Support request] Display last updated date on blog posts

Home Forums Support Display last updated date on blog posts

Viewing 7 posts - 16 through 22 (of 22 total)
  • Author
    Posts
  • #1622839
    Elvin
    Staff
    Customer Support

    Nice one. Glad it worked for you. No problem. 😀

    #2287919
    Lucie

    EDITED:

    I added this to a plugin functions.php file:
    add_filter( ‘generate_post_date_show_updated_only’, ‘__return_true’ );

    I then I added “Last Updated” prefix using .updated-date:before {…}

    (The number of times this specific question was asked/answered suggests it might be time to add this feature as a GUI-able option to the Theme instead of resorting to CSS and filters). But my question now is: what’s the easy way to adjust the spacing below the date line on posts (not pages)?

    Thanks

    #2288067
    Fernando
    Customer Support

    Hi Lucie,

    You’ll need custom CSS for this. Try adding this in Customize > Additional CSS:

    .single.single-post .entry-meta {
        margin-bottom: 50px;
    }

    For feature requests, you can raise one here: https://github.com/tomusborne/generatepress/issues

    Hope this helps!

    #2288956
    Lucie

    Thank you, yes that CSS worked.

    Is the method I’m using to output the “Last Updated Date” (filter plus CSS) inferior to using the dynamic text element, described here?
    https://docs.generatepress.com/article/dynamic-data/#updated-date

    I do have GB 2.0 premium.

    Thanks

    #2289025
    Fernando
    Customer Support

    Your welcome Lucie!

    The Dynamic Block would only be available if you use a Block Element to display your entry meta.

    Say for instance, you use a Block Element – Content Template to edit the layout of your archives, then, the dynamic Block would be possible. There are many more pros in using a Block Element. Example Reference: https://docs.generatepress.com/article/block-element-content-template/

    I wouldn’t say it’s inferior. They’re just two different ways of doing it. Using a Dynamic Block Element would be the more “updated” and user-friendly version of doing it. It’s easier to customize too, without the need for custom CSS.

    Hope this clarifies!

    #2290023
    Lucie

    yes, very helpful. Thanks.

    #2290087
    Fernando
    Customer Support

    You’re welcome Lucie!

Viewing 7 posts - 16 through 22 (of 22 total)
  • You must be logged in to reply to this topic.