If you’ve disabled the Yoast SEO schema feature from the settings but the schema code is still showing up, there might be a few reasons for this issue. It could be due to caching, conflicts with other plugins, or leftover code in your theme.
Why Choose SEMRush?
If you’ve deactivated the Yoast plugin but the schema markup still appears in the Google Rich Snippet tool, yet it’s not visible in the website’s view source, it could be due to one of the following reasons:
Cached Version on Google’s Side:
Google might be showing a cached version of your page. It can take some time for Google to re-crawl and update the changes after a plugin is deactivated.
Server-Side Caching:
Your web host might be using server-side caching that needs to be cleared. This can include Varnish cache, CDN cache (like Cloudflare), or other caching mechanisms.
Other Plugins:
Another plugin might still be injecting schema markup. Check for any other SEO or schema-related plugins that might be adding the markup.
Hardcoded Schema in Theme Files:
Although you’ve checked the source, ensure that the theme or child theme doesn’t have any hardcoded schema markup.
Steps to Diagnose and Fix
Clear All Caches:
Clear your WordPress cache if you’re using a caching plugin.
Clear server-side cache via your hosting provider’s control panel.
Clear any CDN cache (e.g., Cloudflare).
Check for Other Plugins:
Deactivate all plugins except Yoast (if you reactivate it to check) and then recheck your site.
If the schema markup disappears, reactivate the plugins one by one to identify the culprit.
Check Theme Files:
Re-check the header.php and functions.php files in your theme for any schema markup.
Also, check if there are any includes or template parts being used that might contain the schema.
Verify with Google:
After clearing caches, request a re-crawl of your site in Google Search Console:
Go to Google Search Console.
Use the URL Inspection tool to request indexing of your homepage and other key pages.
Debugging Steps in Detail
Clear All Caches:
WordPress Cache: Go to your caching plugin settings and clear all caches.
Server-Side Cache: If your host uses server-side caching, look for options in your hosting dashboard to clear the cache.
CDN Cache: If using a CDN like Cloudflare, log in to your CDN account and clear the cache.
Check for Other Plugins:
Temporarily deactivate all plugins and check the site’s source code again.
If the schema is gone, reactivate the plugins one by one, checking the source code each time to identify the plugin adding the schema.
Inspect Theme Files:
In your theme editor, check header.php, functions.php, and any other template files for any JSON-LD scripts.
Remove or comment out any code related to schema markup.
Request Re-Crawl:
Log in to Google Search Console.
Use the URL Inspection tool, enter your homepage URL, and request indexing.
This will prompt Google to re-crawl your page and update the cached version.
Example of Clearing Cache in Common Scenarios
WordPress Caching Plugins:
W3 Total Cache: Go to Performance > Dashboard and click on “empty all caches.”
WP Super Cache: Go to Settings > WP Super Cache and click on “Delete Cache.”
CDN (Cloudflare):
Log in to Cloudflare.
Select your website.
Go to the Caching tab and click on “Purge Everything.”
Hosting Control Panel:
Check your hosting provider’s documentation or support for instructions on clearing server-side cache.