Site logo

Archived topic

Need to remove internal link from 'Last Updated'

4 replies · Started by Amit on July 21, 2018

Viewing posts 1–5 of 5

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'

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?

This archived topic is closed to new replies.