Created
June 30, 2014 14:34
-
-
Save tomhemsley/13ee1c6d4ee115fbed56 to your computer and use it in GitHub Desktop.
Add rel=nofollow to all Meta Slider links
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* INSTALLATION: this code should be pasted into your theme's functions.php file. | |
*/ | |
function metaslider_nofollow($attributes, $slide, $slider_id) { | |
$attributes['rel'] = "nofollow"; | |
return $attributes; | |
} | |
add_filter('metaslider_flex_slider_anchor_attributes', 'metaslider_nofollow', 10, 3); | |
add_filter('metaslider_nivo_slider_anchor_attributes', 'metaslider_nofollow', 10, 3); | |
add_filter('metaslider_responsive_slider_anchor_attributes', 'metaslider_nofollow', 10, 3); | |
add_filter('metaslider_coin_slider_anchor_attributes', 'metaslider_nofollow', 10, 3); | |
/* END metaslider no follow */ |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Hello there,
Just found what I searched for a while, this code still works !
Thanks A LOT for sharing this 👍