kmaroff
2/27/2019 - 5:08 AM

Удаляем "X-Robots-Tag: noindex" в RSS лентах

//Yoats
add_action( 'init', function() {
		if ( ! class_exists( 'WPSEO_Frontend' ) ) {
			return;
		}
	
		$wpseo_frontend = WPSEO_Frontend::get_instance();
		remove_action( 'template_redirect', array( $wpseo_frontend, 'noindex_feed' ) );
	});
	
	
	
//All in SEO Pack
add_action( 'template_redirect', index_follow_rss, 999999 );
function index_follow_rss() {
    if ( is_feed() ) {
        header( 'X-Robots-Tag: index, follow', true );
    }
}