[Resolved] Need to remove internal link from 'Last Updated'

Home Forums Support [Resolved] Need to remove internal link from 'Last Updated'

Home Forums Support Need to remove internal link from 'Last Updated'

Viewing 5 posts - 1 through 5 (of 5 total)
  • Author
    Posts
  • #628903
    Amit

    Hi,
    Previously we have changed our Published date to Last Updated by adding a function to the child function file and adding some CSS. I hope that the things are same after the Generatepress 2.0 Update.
    I noticed recently that the ‘Last Update: (Date)’ is linked as an anchor text to the page we are on. I would like to remove that part of getting self linked. Even in the blog part of the site, each post is linked twice via the Title as well as the ‘Last Updated Date’

    #629215
    Leo
    Staff
    Customer Support

    Hi there,

    Not sure what function you were using before but try this instead:
    https://docs.generatepress.com/article/show-the-updated-post-date/

    Let me know.

    #629496
    Amit

    I am using this function to display Last Updated date on pages
    # Display Last Modified Date in Pages
    add_action( ‘generate_after_entry_header’, ‘tu_page_meta’ );
    function tu_page_meta() {
    if ( is_singular( ‘page’ ) ) : ?>

    <!– .entry-meta –>
    <?php endif;
    }

    and this CSS

    /* Last Modified date Display */
    .posted-on .updated {
    display: inline-block;
    padding-right: 5px;
    }

    .posted-on .updated + .entry-date {
    display: none;
    }

    .posted-on .updated:before {
    content: “Last Updated “;
    }

    .entry-meta {
    display: flex;
    justify-content: center;
    }

    The date is linked back to the post/page where it is being displayed which I don’t want. How can we remove link from date?

    #629497
    Amit

    For example
    In this link https://www.friedcoffee.com/best-french-press-coffee-maker-picks/
    The ‘Last Updated July 4, 2018’ is linked back to the same page – https://www.friedcoffee.com/best-french-press-coffee-maker-picks/.

    #629919
    Leo
    Staff
    Customer Support
Viewing 5 posts - 1 through 5 (of 5 total)
  • You must be logged in to reply to this topic.