skip to Main Content

I’ve configured my GTM with the JSON-LD markup I placed in GTM and its firing perfectly. However, if I will check it in structured data testing tool still the auto-generated markup by Yoast is showing.

screenshot of my markup by yoast

Can I just remove or disable the Yoast schema? Will it not be harmful in terms of SEO?

2

Answers


  1. There’s no harm in what Yoast is adding. You could leave it there. Or you could devise some JavaScript to find the script tag and remove it.

    Login or Signup to reply.
  2. To answer the first question, you can remove all the Yoast schema by adding the following to your functions.php (should be in your child theme):

      function bybe_remove_yoast_json($data){
        $data = array();
        return $data;
      }
      add_filter('wpseo_json_ld_output', 'bybe_remove_yoast_json', 10, 1);
    

    Tested working and per: https://www.bybe.net/yoast-seo-guide-disable-schema-json-ld-wordpress/

    Login or Signup to reply.
Please signup or login to give your own answer.
Back To Top
Search