Skip to content

Instantly share code, notes, and snippets.

@despecial
despecial / wordpress-remove-yoast-comments
Last active January 30, 2018 13:59 — forked from paulcollett/functions.php
Remove Yoast HTML Comments “This site is optimized with the Yoast WordPress SEO plugin”
/* 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);
}
@despecial
despecial / wordpress-remove-slider-revolution-meta
Created January 30, 2018 13:57
remove Slider Revolution generator meta tag
/* 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);
}