Ad

Yoast SEO: Remove Og:description And Twitter:description On Certain Page

- 1 answer

how can i remove the og:description and twitter:description tag for a certain page with the yoast-seo plugin?

Ad

Answer

I solved it on my own:

add_filter("wpseo_opengraph_desc", "remove_yoast_og");
add_filter("wpseo_twitter_description", "remove_yoast_og");
function remove_yoast_og($description) {
    if (is_page(1093)) {
        return false;
    }

    return $description;
}
Ad
source: stackoverflow.com
Ad