[Support request] Add text BEFORE updated date beneath post title

Home Forums Support [Support request] Add text BEFORE updated date beneath post title

Home Forums Support Add text BEFORE updated date beneath post title

Viewing 3 posts - 1 through 3 (of 3 total)
  • Author
    Posts
  • #1622140
    Remco

    Hi all,

    Currently my text looks the following (example):

    January 17 2021 by Marc

    I would like to change this to

    Last updated on January 17 2021 by Marc

    Any way I can do this? I found a resource, but it only allowed me to add some text AFTER the date.

    Thank you.

    #1622437
    David
    Staff
    Customer Support

    Hi there,

    you can use this PHP Snippet:

    add_filter( 'generate_post_date_output','tu_add_to_post_date' );
    function tu_add_to_post_date( $output ) {
        return '<span class="date-label">Last updated on </span>' . $output;
    }

    How to add PHP: https://docs.generatepress.com/article/adding-php/

    #1623065
    Remco

    Hi David,

    Thanks, but this is still adding the text AFTER the date instead of before it.

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