Site logo

Archived topic

How to disable schema?

15 replies · Started by Pascal on October 26, 2017

Viewing posts 1–15 of 16

Hi
I use a plugin for that and I need that GP do not include it's own schema.
I have read a lot of post about that here, but they are old.
I have also read that in the last version it will be possible to completly remove it, so... how ?
Thanks

Currently it's only possible to remove it from the body and article elements. In a future version (not the next one, but soon), it will be possible to edit the attributes of every element.

For now, the other topics you found are likely still the answer.

Let me know if you need more info :)

Ok :)

I have seen 2 methods, which one works please?

#1
if ( ! function_exists( 'generate_body_schema' ) ) :
function generate_body_schema()
{
	echo '';
}
endif;

if ( ! function_exists( 'generate_article_schema' ) ) :
function generate_article_schema( $type = 'CreativeWork' )
{
	echo '';
}
endif;

#2

add_filter( 'generate_article_schema', 'example_function_name' );
function example_function_name()
{ 
    return '';
}
add_filter( 'generate_body_schema', 'example_function_name2' );
function example_function_name2()
{ 
    return '';
}

#2 is the way to go :)

How to write the function #2 to remove all the generatepress schema?
For example "creativework" or "wpheader" ?
Thanks!

It's not possible right now. However, having that microdata doesn't harm your site, even if you go with something like JSON-LD instead.

In GP 2.2 we will be introducing an attribute system that will allow us to remove all schema if needed.

Hi Tom

GP 2.2 sounds far away as we only are at 2.1.1 :-(

Maybe microdata do not harm our sites, but it's not clean, and confusing, to have a ton of different entry while using the Google structured data testing tool...

Thanks

Oh sorry Tom... but it’s a good news :)

Hi

Any news about this 2.2 please ?

I'm using GP 2.1.2 and GP Premium 1.6.2

Thanks

It's on the way but will be take a bit longer still.

Thanks for your patience :)

Hello

My first question was on October 26, 2017 and I was hopping to read news about it in the last version GeneratePress 2.1.3, but not... :-(

Thanks

Not yet, but GP 2.2 will have the new attribute system in place that will make this possible.

Yes Tom I know :) the big questions is when...?
Thanks

There's no concrete date yet. It will likely be in August sometime.

This archived topic is closed to new replies.