How to add rel=”nofollow” to social icons in Oxygen

This tutorial provides the steps to add rel="nofollow" to the HTML markup of anchor elements (links) output by Social Icons component of Oxygen.

Before:

After:

Here’s How

In your Oxygen Template/editor, add a Code Block component at the end of all others.

PHP & HTML:

<?php
	// echo "hello world!";
?>

JavaScript:

(function($) {
'use strict';

	$('.oxy-social-icons a').attr('rel', 'nofollow');

}(jQuery));

Reference

https://wpdevdesign.com/data-attributes-in-oxygen/


Posted

in

,

by

Comments

Leave a Reply

Your email address will not be published. Required fields are marked *