add_action(‘wp_head’, ‘remove_all_wpseo_og’, 1);
function remove_all_wpseo_og() {
remove_action( ‘wpseo_head’, array( $GLOBALS[‘wpseo_og’], ‘opengraph’ ), 30 );
}

 

 

/*****************************************/

 

add_action(‘template_redirect’,’remove_wpseo’);

function remove_wpseo(){
if (is_page(4)) {
global $wpseo_front;
if(defined($wpseo_front)){
remove_action(‘wp_head’,array($wpseo_front,’head’),1);
}
else {
$wp_thing = WPSEO_Frontend::get_instance();
remove_action(‘wp_head’,array($wp_thing,’head’),1);
}
}
}

 

 

where 4 is page id

Advertisements