Skip to content

Instantly share code, notes, and snippets.

View YunarW's full-sized avatar

YunarW

View GitHub Profile
@YunarW
YunarW / NoFollow
Last active July 31, 2019 10:05 — forked from tomhemsley/NoFollow
Add rel=nofollow to all Meta Slider links
/**
* 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);