Underline links only on post and pages

Posted in: Newspaper
Post count: 12

Hi guys,
I would like all links only on posts and pages to have custom color and to be underlined.

I added this code:

/* sottolinea links nei post – 01c4c4 al passaggio del mouse*/
.td-post-content a:link, a:visited{
color: #ff7d27 !important;
text-decoration: #ff7d27 underline !important;
decoration-color: #ff7d27 !important;
}
/* colore per links passaggio mouse */
.td-post-content a:hover{
color: #01c4c4 !important;
text-decoration: #01c4c4 underline !important;
}

this code works, but it applies also to menu links, How can I have this only on posts and page content?
Thank you

See example:

https://www.massimobasso.com/facciamo-un-salto-ad-horseshoe-bend/

I read other topics and tried, but some links are broken and other solutions doesn’t seem to work.

( Traduzione italiano : Ciao ragazzi vorrei che solo nei post e nelle pagine i links fossero sottolineati e con un colore personalizzato.
Ho aggiunto il codice, ma il colore compare anche nei menu. Potete aiutarmi? Ho letto anche altre soluzioni, ma alcuni links sono corrotti ed altre soluzioni non sembrano funzionare. )

Post count: 35449

Hello,

Please try this code
/* sottolinea links nei post – 01c4c4 al passaggio del mouse*/
.tdc-content-wrap .tdb_single_content a:link, a:visited{
color: #ff7d27 !important;
text-decoration: #ff7d27 underline !important;
decoration-color: #ff7d27 !important;
}
/* colore per links passaggio mouse */
.tdc-content-wrapt .tdb_single_content a:hover{
color: #01c4c4 !important;
text-decoration: #01c4c4 underline !important;
}

I hope this will help you!
Thank you!

Post count: 12

I tried, but it doesn’t work. The color is still shown on all links across the page (on menu, titles, everything has a link).
I tried flush cache and regenerate css, but nothing happens.

Post count: 21065

Hello!

Other workaround could be to edit normally the post, select the text and press CTRL + U (on Windows) or CMD + U (on macOS) on your keyboard. This will underline the selected text. Check this article too: https://ultimateblocks.com/underline-text-wordpress/
Or you can create classes, see this topic: https://forum.tagdiv.com/topic/no-option-to-underline-text-in-tagdivnewspaper-theme/

Hope that helps you!

Thank you!

Post count: 12

But with 250 posts it could be a challenge. Before updating to latest version my code worked fine. I will find another solution.

Post count: 35449

Hi maxonline, if you agree we can take a closer look at this situation, but for this you’ll need to contact is via email at contact@tagdiv.com and you’ll need to provide wp-admin access.
Thank you!

Viewing 6 posts - 1 through 6 (of 6 total)
The forum ‘Newspaper’ is closed to new topics and replies.