This code enables you to dynamically add nofollow to all a href links which contain a specific class. In this case, nofollow is added to all links which contain a class named download.
Once installed, the code will change the HTML output of your links from this :
<a class="download" href="#">Download</a>
To this :
<a class="download" href="#" rel="nofollow">Download</a>
As seen in the following demo video.
Demo Video
Shows nofollow added to a link which includes a specific CSS class.
Tested using the Genesis Sample child theme by StudioPress however will work in any WordPress theme without needing modification.
Installation Steps
There’s 2 steps :
Leave a Reply
You must be logged in to post a comment.