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
    Commented Jan 6, 2018 at 16:34
  • I've messed around with that a bit but haven't been able to get it...surely a lack of knowledge. Commented Jan 6, 2018 at 16:37

1 Answer 1


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

  • 1
    Thank you for the explanation and fix, it worked as expected. Commented Jan 6, 2018 at 19:31

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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