-
-
Save YunarW/7ea08b351aedd7410baa8e587cd05d7e to your computer and use it in GitHub Desktop.
Add rel=nofollow to all Meta Slider links
This file contains 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 (add at the end of last code). | |
*/ | |
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