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); | |
} |
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); | |
} |