How to disable the Schema markup that adds the Astra theme

astra theme templates

If we talk about SEO, one of the rising trends, which is promoting more Google, is the marking of Schema, the system by which to label content depending on its type.

This, which is not new, is used by search engines such as Google to identify parts of your content or entire contents and thus generate rich snippets, or simply organize the search engine indexes.

In this way, Google can identify, if your publication is an article, or a recipe, a film review; and if within these types of content the different elements that distinguish them are declared, such as the cooking time in the recipes, or the director if it is a film review.

Do you know what I’m talking about?

pizza recipe schema

How are they created?

Now, apart from the pile of WordPress plugins that there is to mark the Schema of the contents, there are more and more marked Schema included by default in themes and plugins of all kinds.

For example, the latest versions of Yoast SEO include it, being able to globally configure the Schema of the different types of content, or one by one from the editor.

yoast seo schema settings

So what happens when there are several components of my WordPress website that add Schema markup? Well, nothing good.

If several elements of your WordPress installation add duplicate Schema markup data you will confuse the search engines, and it is possible that in the end they will not highlight your content as such, losing search engine rankings and you don’t want that, do you?

Well, today I wanted to tell you that if you use the Astra theme, it includes this type of structured Schema data by default, and therefore if you don’t control it, and another plugin is adding additional markup, you could be ruining the SEO of your website.

So, if you are sure that you prefer to control the structured data of the Schema with a SEO plugin or other method, this is how you can disable the Astra Schema marking .

Deactivate all Astra Schema marking

Add this code to the functions.php file of the Astra child theme:

add_filter( 'astra_schema_enabled', '__return_false' );Code language: JavaScript (javascript)

Selectively deactivate the marked Astra Schema

If, on the contrary, you prefer to deactivate only some of the markings of the Schema that Astra adds, the codes would be the ones I put below. In the name of the marker, I put a link to the page that explains what it is for so that you know what you are taking out.

Schema Organization

add_filter( 'astra_organization_schema_enabled', '__return_false' );
Code language: JavaScript (javascript)

Schema Person

add_filter( 'astra_person_schema_enabled', '__return_false' );
Code language: JavaScript (javascript)

Schema SiteNavigationElement

add_filter( 'astra_site_navigation_schema_enabled', '__return_false' );
Code language: JavaScript (javascript)

Schema WPHeader

add_filter( 'astra_wpheader_schema_enabled', '__return_false' );
Code language: JavaScript (javascript)

Schema WPFooter

add_filter( 'astra_wpfooter_schema_enabled', '__return_false' );
Code language: JavaScript (javascript)

Schema WPSidebar

add_filter( 'astra_wpsidebar_schema_enabled', '__return_false' );
Code language: JavaScript (javascript)

Schema BreadcrumbList

add_filter( 'astra_breadcrumb_schema_enabled', '__return_false' );
Code language: JavaScript (javascript)

Schema CreativeWork

add_filter( 'astra_creativework_schema_enabled', '__return_false' );
Code language: JavaScript (javascript)

What do I recommend?

So, contrary to what you may imagine, do not disable the Astra theme’s Schema markers unless you start using a plugin that clearly duplicates structured data, and that will be warned by Google’s structured data test tool.

google structured data testing tool

If you analyze your pages and find some structured data duplicated, then take action, not before.

Read this post in Spanish: Cómo desactivar el marcado de Schema que añade el tema Astra

How useful was this post?

Click on a smiley to rate it!

Average rating 0 / 5. Vote count: 0

No votes so far! Be the first to rate this post.

As you found this post useful...

Follow us on social media!

About The Author

Leave a Comment

Your email address will not be published. Required fields are marked *

Scroll to Top