/ Documentation /General/How to enable/disable schema markup from post/page?

How to enable/disable schema markup from post/page?

Schema Pro plugin provides the following filter that helps you to enable or disable schema markup on single page/post.

Filter:

wp_schema_pro_default_markup

Type: Boolean
Default: False

Here is a code that you can directly add to your child theme’s functions.php file.

add_filter( 'wp_schema_pro_default_markup', 'my_function' );
function my_function( $bool ) {
  return true;
}

Before: When you edit single post/page here is how schema settings will look –

After: Once you add code and edit a single post/page, you will see a toggle to disable schema. If you have implemented multiple schema types on the same page then you will see options individually.

Toggle to disable schema

Note: By default, the toggle will be OFF. That means when you add filter code, your schema will be disabled. You can enable the required schema on the post/page.

Was this doc helpful?
What went wrong?

We don't respond to the article feedback, we use it to improve our support content.

Need help? Contact Support
On this page
Scroll to Top