1. Home
  2. Knowledge Base
  3. Remove All Schema from Product Category Pages

Remove All Schema from Product Category Pages

Rank Math adds Schema to your product category pages according to Google’s structured data guidelines. But, if you wish to remove the Schema, you can follow the exact steps discussed in this tutorial.

Removing Schema from Product Category Pages

In this knowledgebase article, we’ll walk you through how you can remove all Schema from your product category pages.

1 Product Schema

To remove only the Product Schema being added by Rank Math from all your product category archives, navigate to Rank Math > Titles & Meta > Product Categories inside your WordPress dashboard. Then, scroll down to find the Remove Snippet Data option and enable the option as shown below.

Remove snippet data from product categories

Click Save Changes. Now, you can check the source code or test with the Google’s Rich Results Test and see if the Product Schema has been removed from the product category pages.

2 All Schema

If you wish to remove all Schema from your product category pages (and not just the Product Schema), the above setting won’t help you much. You’ll need to add the following code snippet to your theme’s functions.php file or rank-math.php file. We recommend adding this code snippet to /wp-content/themes/theme-name/rank-math.php. If you haven’t created the rank-math.php file yet, follow this tutorial to create the Rank Math file in your theme folder using FTP or cPanel File Manager.

Once you’ve created the file, navigate to Appearance > Theme Editor inside your WordPress dashboard. From the list of files shown on the right side of the screen, choose rank-math.php and add the following code snippet.

/**
 * Filter to remove all Schema from product category pages
 */
add_filter('rank_math/json_ld', function ($data, $jsonld) {
    if (is_product_category()) {
        return [];
    }
    return $data;
}, 99, 2);

Once you’ve added the code, click the Update File button to save the changes.

Filter to remove Schema from all product category pages

Now, you can check if your product category has any Schema Markup on the source code or use Google’s Rich Results Test.

And, that’s it! We hope the tutorial was helpful in removing Schema from product category pages. If you have absolutely any questions on using Schema, feel free to reach our support team, as we’re always here to help.

Still not using Rank Math?

Setup takes less than 5 minutes including the import from your old SEO Plugin!

Know more about the PRO Version

Was this article helpful?

Still need help?

?

Submit Your Question

Please give us the details, our support team will get back to you.

Open Ticket