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.
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.