Yoast seo 11.0 and Genesis Built-in Schema

#1

New Yoast plugin is adding its schema markup. Now should we remove genesis built-in schema? More Details.

2 Likes
#4

Impressed with Yoast SEO after this update :heart_eyes:

1 Like
#5

It means we have to remove Genesis Schema? @GulshanKumar ?

#6

Yes, you should.

#7

Can we add Review, AggregateReview and other type of schema with Article schema?
Also, yoast isn’t adding Wp-header, wp-sidebar etc…what about that?

#8

That’s doesn’t seems important …

1 Like
#9

Yes, you can via JSON-LD markup. I have published a guide on this.

1 Like
#10

Yes, you should do it to avoid any markup error.

/**
 * Disable Genesis Schema
 *
 * @package      EAGenesisChild
 * @author       Bill Erickson
 * @since        1.0.0
 * @license      GPL-2.0+
 */

add_action( 'init', 'be_disable_genesis_schema' );
/**
 * Disable Genesis Schema
 * @author Bill Erickson
 * @see https://www.billerickson.net/yoast-schema-with-genesis/
 */
function be_disable_genesis_schema() {

	$elements = array(
		'head',
		'body',
		'site-header',
		'site-title',
		'site-description',
		'breadcrumb',
		'breadcrumb-link-wrap',
		'breadcrumb-link-wrap-meta',
		'breadcrumb-link',
		'breadcrumb-link-text-wrap',
		'search-form',
		'search-form-meta',
		'search-form-input',
		'nav-primary',
		'nav-secondary',
		'nav-header',
		'nav-link-wrap',
		'nav-link',
		'entry',
		'entry-image',
		'entry-image-widget',
		'entry-image-grid-loop',
		'entry-author',
		'entry-author-link',
		'entry-author-name',
		'entry-time',
		'entry-modified-time',
		'entry-title',
		'entry-content',
		'comment',
		'comment-author',
		'comment-author-link',
		'comment-time',
		'comment-time-link',
		'comment-content',
		'author-box',
		'sidebar-primary',
		'sidebar-secondary',
		'site-footer',
	);

	foreach( $elements as $element ) {
		add_filter( 'genesis_attr_' . $element, 'be_remove_schema_attributes', 20 );
	}
}

/**
 * Remove schema attributes
 *
 */
function be_remove_schema_attributes( $attr ) {
	$remove = array( 'itemprop', 'itemtype', 'itemscope' );
	foreach( $remove as $item ) {
		if( !empty( $attr[ $item ] ) )
			unset( $attr[ $item ] );
	}
	return $attr;
}
1 Like
#11

Yoast team also recommends disabling genesis schema completely.

Hi

Yes, from the last release, v11, Yoast SEO already uses JSON-LD to add information about your site search, your site name, your logo and your social profiles to your web pages. You can find all the types of structured data that Yoast SEO premium can currently add to your site here : https://developer.yoast.com/schema-documentation/yoast-seo/.

As a double schema markups could get Google confused, we definitely suggest you deactivate the Genesis Schema markups already outputted by Yoast.

And bill erickson just released a plugin for genesis which does the same thing as gulshans code.

So highly recommended to remove genesis schema’s.

1 Like