Possible to ignore link color in headings

I’ve googled and search through the forum without any luck.

Currently using minimal theme and both “Style settings” and “Minimal Theme Settings” plugins installed. Gone through all the menus without finding this option.

My question is: does anyone know if it is possible to ignore link color for headings? Meaning if I have a link coded as heading 1-6 it would not apply link color to the heading?

1 Like

You can do it with a CSS snippet.

I don’t know the exact code you need, but the selector should be something like h1 > a (maybe not complicated in Live Preview, and you’ll need 1 for each heading level). You’ll set the color to whatever variable holds the normal text color.

yes I am able to change heading colors. The problem is that if for instance a H1 heading is also a link, the link color will override the default H1 color.

The example CSS I suggested specifically targets a link inside a heading (altho it only targets a link that’s immediately inside — I should have posted h1 a which targets links at any depth inside a heading). It probably needs to be changed because the markup of Live Preview is complicated, but what you want is definitely possible.

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.