Back to Community

How to Remove or Modify Schema Markup in Rank Math SEO

12 threads Sep 10, 2025 PluginRank math seo

Content

Schema markup, or structured data, helps search engines understand your content. However, there are times when the default schema generated by the Rank Math SEO plugin isn't suitable for a particular page. You might be seeing errors in Google Search Console, experiencing conflicts with another plugin, or simply want to remove schema from pages like brand lists or archives.

This guide covers the most common methods for removing or modifying unwanted schema markup on your WordPress site.

Why Would You Need to Remove Schema?

There are a few primary reasons for removing schema data:

  • Google Search Console Errors: Google might flag missing required properties (like offers or review for a Product schema) on pages where that schema type is not appropriate.
  • Plugin Conflicts: Other plugins (e.g., e-commerce brand plugins) might be generating their own schema, leading to duplicate or conflicting markup.
  • Page Type: Schema like CollectionPage or Product may be automatically added to archive, category, or brand pages where it doesn't belong.
  • Customization: You may want to remove specific properties, like an author's image, from an otherwise useful schema type.

Common Solutions for Removing Schema

1. Using Built-in Rank Math Switches

For certain WordPress content types, Rank Math provides a simple toggle switch to remove all schema data.

  • For Categories & Tags: Navigate to Posts > Categories or Tags. Edit the specific category or tag. In the Rank Math meta box, you will find a "Remove Snippet Data" option. Enabling this switch will prevent any schema from being output on that archive page.

This is often the fastest and easiest solution for taxonomy archive pages.

2. Bulk Editing Posts

If a specific schema type (like Video schema) has been applied to many posts and needs to be removed, you can use WordPress's bulk edit功能.

  1. Go to your post list view (Posts > All Posts).
  2. Select all the posts you want to update.
  3. From the Bulk Actions dropdown, select Edit and click Apply.
  4. In the bulk editor, find the Rank Math Schema option.
  5. Change the schema type to Default or another appropriate type and update the posts.

Additionally, ensure the Autodetect Video option is disabled in Rank Math > Titles & Meta > [Post Type] to prevent the plugin from automatically adding video schema in the future.

3. Using Filter Hooks (Code Snippets)

For more advanced control, such as removing schema from a specific page (like the homepage) or removing a specific property, you need to use WordPress filter hooks. The following code snippets can be added to your theme's functions.php file or a code snippets plugin.

Remove Schema from the Homepage:
This code removes the WebPage schema (which is often of the CollectionPage type) from the homepage.

add_filter( 'rank_math/json_ld', function( $data, $jsonld ) {
    if ( ! is_front_page() || ! isset( $data['WebPage'] ) ) {
        return $data;
    }
    unset( $data['WebPage'] );
    return $data;
}, 99, 2);

Remove Author Image from Schema:
This filter allows you to modify the Person schema to remove the author image.

add_filter( 'rank_math/schema/person', function( $entity ) {
    if ( isset( $entity['image'] ) ) {
        unset( $entity['image'] );
    }
    return $entity;
});

Remove Schema from Taxonomy Archives:
This filter can be used to remove schema data from all taxonomy archive pages (categories, tags, etc.).

add_filter( 'rank_math/snippet/remove_taxonomy_data', function( $value, $taxonomy ) {
    return true;
}, 10, 2);

Important Notes and Troubleshooting

  • Identify the Source: Before removing schema, use Google's Rich Result Test tool to confirm the schema is indeed being generated by Rank Math SEO and not another plugin or your theme.
  • Child Theme: Always add custom code to a child theme's functions.php file to prevent it from being overwritten during theme updates.
  • Testing: After making any changes, clear your site and browser cache, then re-test the page URL with the Rich Result Test tool to confirm the schema has been removed or modified correctly.

By using these built-in options and code snippets, you can gain precise control over the structured data on your website, resolve Google warnings, and prevent conflicts.

Related Support Threads Support