No results found. Try again with different words?

Search must be at least 3 characters.

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 article helpful?
Did not find a solution? We are here to help you succeed.

Related Docs

Scroll to Top