Site logo

Archived topic

Remove link from date in blog post/archive page

2 replies · Started by Gianluca on July 18, 2020

Viewing posts 1–3 of 3

Dear GP team,

I've added to my website this PHP code https://docs.generatepress.com/article/entry-meta-style/#example-1 and this CSS:

.posted-on .updated {
     display: inline;
 }
 .posted-on a time:nth-child(2) {
     display: none;
 }
 .posted-on a time:first-child:before {
     content: "Ultimo aggiornamento: ";
 }
 .posted-on a time:last-child:before {
     content: "Pubblicato il ";
 }

to show the last updated date on posts and archive pages.

I'd like also to remove the link from the date, but adding this PHP code https://docs.generatepress.com/article/generate_post_date_output/#remove-link-from-date does not work properly, as you can see here https://imgur.com/a/aoGob0X the code removes the link but adds 2 dates and doesn't show the "last updated" text.

Any idea how to fix this?

Thank you in advance

Never mind, I was able to solve the issue with this CSS:


.posted-on .updated {
    display: inline-block;
}

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

.posted-on .updated:before {
    content: "Aggiornato il ";
}

.posted-on .published:before {
    content: "Pubblicato il ";
}

:)

Glad you've figured out :)

This archived topic is closed to new replies.