-2

https://airprofan.com/industrial-fan-applications/abrasive-airstream/

This is a page under a custom post type for applications (https://airprofan.com/industrial-fan-applications).

We want every hyperlinked text to be underlined, but only in the paragraphs, not in the ul's.

So on the example page I gave, I'm looking for each of these to underline: https://cl.ly/ogil.

Of course we could do it all manually, but there has to be a way through CSS to do this. We have 30 of these pages now and always are tweaking.

  • on the body element you have the CSS class single-application that you can use to target pages of this custom post type. – mmm Jan 6 '18 at 16:34
  • I've messed around with that a bit but haven't been able to get it...surely a lack of knowledge. – Greg Dietrich Jan 6 '18 at 16:37
2

You can try this-

.single-application .entry-content p > a {
    text-decoration: underline;
}

Where .single-application is based on your post type, .entry-content is the wrapper of your post content.

See the page source-

enter image description here

| improve this answer | |
  • 1
    Thank you for the explanation and fix, it worked as expected. – Greg Dietrich Jan 6 '18 at 19:31

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.