Site logo

Archived topic

Can't delete Schema Markups

6 replies · Started by Jacob on June 25, 2019

Viewing posts 1–7 of 7

Hi, I have tried to disable the schema markup that is default in the Theme with this code:

add_filter( 'generate_header_microdata', '__return_empty_string' );
add_filter( 'generate_sidebar_microdata', '__return_empty_string' );

Since I am not a Techie I have tried two different plugins where I can add PHP Code (without having to do actual changes in the Theme code).
However, it does not work. I can still find the schemas in through the Structured Data Testing Tool -

What is the problem?

Hi there,

Try this instead:

add_filter( 'generate_schema_type', '__return_false' );

Thanks Tom! It works! You made my day (night I guess). Thanks!

/Jacob

HI again Tom. Actually I can see that the Schema is still on some of the pages for some weird reason.. Not all of them disappeared..

Any examples? Which pages?

Thanks Tom.
Really weird now when I look it's gone. Must have been some cache-thing. Thanks and sorry for bothering.

I have actually one more question - That is not related..

Is there a function within the theme to put a banner with a link in the top of the page? Or is it better to do that with a plugin?

Thanks again, Jacob

This archived topic is closed to new replies.