Skip to content

Instantly share code, notes, and snippets.

@despecial
despecial / wordpress-remove-slider-revolution-meta
Created Jan 30, 2018
remove Slider Revolution generator meta tag
View wordpress-remove-slider-revolution-meta
/* add to functions.php in theme folder */
// Remove Slider Revolution meta tag
add_filter('wp_head', 'remove_revslider_meta_tag',0);
function remove_revslider_meta_tag() {
remove_action('wp_head', 'ls_meta_generator', 9);
}
@despecial
despecial / wordpress-remove-yoast-comments
Last active Jan 30, 2018 — forked from paulcollett/functions.php
Remove Yoast HTML Comments “This site is optimized with the Yoast WordPress SEO plugin”
View wordpress-remove-yoast-comments
/* add to functions.php in theme folder */
// Remove All Yoast HTML Comments
// https://gist.github.com/paulcollett/4c81c4f6eb85334ba076
if (defined('WPSEO_VERSION')){
add_action('get_header',function (){ ob_start(function ($o){
return preg_replace('/\n?<.*?yoast.*?>/mi','',$o); }); });
add_action('wp_head',function (){ ob_end_flush(); }, 999);
}