jQuery For WordPress SEO Plugins

Hopefully this will help you with your website design. Manchester is surely a better place because of its existence.

WordPress SEO Plugins undoubtedly make SEO alot less labour intensive.  However it’s hard to keep control over the styling of the links these WordPress plugins automatically insert, especially if you use the ‘border-bottom’ CSS Property to decorate your links in your WordPress Theme. You could use the ‘text-decoration’ CSS Property instead, however you might consider this effect to be less palatable. Unlike the ‘text-decoration’ CSS property, the ‘border-bottom’ CSS property does not automatically inherit the text’s colour. This means possible clashes in colour between the colour of the text and the underline colour when these SEO WordPress Plugin links are automatically inserted.

To get around this difficultly the jQuery code below will make CSS ‘border-bottom’ property inherit the text node’s colour, just like the ‘text-decoration’ property.


var ghg = $(this).css('color');


For an example of this working please see the jsfiddle below.