[Support request] Adding "Last Modified" to Pages (not posts)

Home Forums Support [Support request] Adding "Last Modified" to Pages (not posts)

Home Forums Support Adding "Last Modified" to Pages (not posts)

Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
    Posts
  • #1162118
    Simon

    Hi,

    I’ve searched for this topic and tried the solutions mentioned here:

    https://generatepress.com/forums/topic/how-to-display-last-updated-date-on-pages-and-posts/#post-485093

    But I can’t get the “Last Modified” dates to appear on my pages.

    I suspect this is because I disable the content title (that and I’m an idiot when it comes to these things lol).

    I don’t have a child theme. So am I right in thinking I need to add PHP (via plugin) and then add some custom CSS code?

    Thanks.

    #1162364
    Tom
    Lead Developer
    Lead Developer

    Hi there,

    Try this:

    add_action( 'generate_after_page_title', function() {
        if ( is_page() ) {
            generate_do_post_meta_item( 'date' );
        }
    } ); 

    Let me know 🙂

    #1162523
    Simon

    Thanks, Tom.

    Where do I put that code? In the plug-in that allows me to change the php or the additional CSS field?

    #1162754
    David
    Staff
    Customer Support

    Hi there,

    its PHP – so thats the Code Snippets plugin or in your Child Themes functions.php file

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