Disable Yoast on a single page
-
When the Yoast plugin was activated, it changed the H1 on this page:
Currently, it says, “Events Archive – OMNI Human Resource Management” Before the plugin was activated, it simply said, “Events”. Which is what I’d like to change it back to. It’s also adding ” – OMNI Human Resource Management” to each event detail page. I can’t seem to find any way to change it within the plugin in WordPress. If that’s not possible, is there a way to disable Yoast for just one page? After doing some googling, I added the following code to the functions.php file, but it doesn’t have any effect:
add_action(‘template_redirect’,’remove_wpseo’);
function remove_wpseo(){
if (is_page(1770)) {
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);
}
}
}The page I need help with: [log in to see the link]
- The topic ‘Disable Yoast on a single page’ is closed to new replies.