Home Forums WC Vendors Pro Support Yoast SEO conflict Reply To: Yoast SEO conflict

#65195
Citydrive
Participant

Hi,
Thanks for your time i don’t have the problem with the storefront theme.
But i found a way to resolve this. I just need to disable yoast in the page.

If this can help someone.
I added this code in function.php file. (1219 is the id of the dashboard page)


add_action('template_redirect', 'remove_wpseo');

function remove_wpseo()
{
    if (is_page(1219)) {
        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);
        }
    }
}
This website uses cookies to ensure you get the best experience on our website.