Back to Community

How to Disable or Customize Yoast SEO's Schema Markup to Prevent Conflicts

21 threads Sep 7, 2025 PluginYoast seo

Content

If you're using the Yoast SEO plugin, you've likely benefited from its automatic generation of structured data (schema markup). However, many WordPress site owners run into situations where they need to modify or completely disable this output. Common reasons include wanting to use a different schema plugin, needing to output a schema type not supported by Yoast, or avoiding duplicate markup that can cause validation errors.

Why Schema Conflicts Happen

Schema.org structured data helps search engines understand your content. While helpful, Yoast SEO's automatic schema generation is not always customizable enough for every need. Problems arise when:

  • Another plugin or your theme also generates schema, creating duplicate markups.
  • You need a specific schema type (e.g., LocalBusiness, PodcastEpisode, Event) that Yoast SEO does not support.
  • You want to remove certain properties, like datePublished or dateModified, from the schema on specific pages.
  • You are using a page builder like Thrive Architect that may not integrate directly with Yoast's schema blocks for FAQs or How-to's.

How to Disable Yoast SEO Schema Completely

The most straightforward solution is to disable all schema output from the Yoast SEO plugin. This is recommended if you are using a dedicated schema plugin like Schema Pro or Schema & Structured Data for WP and want to avoid any conflicts.

You can achieve this by adding a simple code snippet to your theme's functions.php file:

add_filter( 'wpseo_json_ld_output', '__return_false' );

Important: Always use a child theme when modifying theme files and create a full backup of your site before proceeding. This code will disable all schema output from Yoast SEO across your entire site.

Disabling Schema for Specific Posts or Post Types

If you only need to disable Yoast's schema on certain pages or for specific post types, a more advanced filter is required. The following code snippet provides a foundation you can adapt. It checks the current post type and disables Yoast's output if it matches one you specify.

add_filter( 'wpseo_json_ld_output', 'disable_yoast_schema_on_specific_pages', 10, 1 );
function disable_yoast_schema_on_specific_pages( $data ) {
    // Get the current post ID
    $current_post_id = get_the_ID();
    
    // List of post IDs where you want to disable schema
    $disabled_post_ids = array( 123, 456, 789 );
    
    // List of post types where you want to disable schema
    $disabled_post_types = array( 'product', 'movie' );
    
    // Check if current post ID is in the disabled array
    if ( in_array( $current_post_id, $disabled_post_ids ) ) {
        return false;
    }
    
    // Check if current post type is in the disabled array
    if ( is_singular( $disabled_post_types ) ) {
        return false;
    }
    
    return $data;
}

You will need to customize the $disabled_post_ids and $disabled_post_types arrays to fit your specific needs.

Important Considerations and Limitations

  • Testing is Crucial: After implementing any code changes, always validate your pages using a tool like Google's Rich Results Test or the Schema Markup Validator to ensure the desired schema is present and there are no errors.
  • Yoast Limitations: It is important to understand that the free version of Yoast SEO has limitations. For example, it does not support LocalBusiness schema, and some schema types like FAQ or HowTo are only available as blocks within the WordPress block editor (Gutenberg), not the classic editor.
  • No Built-In Removal of Specific Properties: Yoast SEO does not provide a built-in method to remove only certain properties (like dates) from its schema output. This requires complex custom code that is beyond typical support scope.

Conclusion

Managing schema markup is a key part of technical SEO. While Yoast SEO provides a solid foundation, there are valid reasons to take more control over your structured data. By using the wpseo_json_ld_output filter, you can effectively disable Yoast's output to make room for custom or third-party schema solutions, ensuring your pages are described accurately to search engines without conflicts.

Related Support Threads Support