Schema author name property has two entries on the About page

#477955
  • Resolved Canek Goded
    Rank Math free

    Hello,
    On the About page, the “name” property of the author schema has two different entries under “Person” (the name of the “About Me” page and the name of the author).
    I get the problem in the “author” schema, in “Breadcrumb” and in “mainEntityOfPage”.
    In Screaming Frog I get the error 3 times. The error says: “The required maximum number of ‘http://schema.org/name’ properties has been exceeded for ‘Person'”.
    I understand that having two different names for the same thing can confuse search engines.
    Is there a way to only show the author’s name?
    On the other hand, the Breadcrumb schema appears on all the pages of the website, even if I only added it to the posts.
    Is there a way that the Breadcrumbs schema only appears in the posts?
    Thanks for the support.

Viewing 5 replies - 1 through 5 (of 5 total)
  • Hello,

    These schema properties are essential for the search engine especially the breadcrumbs as this will guide the search engine about the structure of your website.

    With that said, you may refer to this filter code to apply the breadcrumbs only to posts:

    add_filter( 'rank_math/snippet/breadcrumb', function( $entity ) {
    	if ( !is_singular( 'post' ) ){
    		return false;
    	}
    	return $entity;
    });

    Hope that helps and please do not hesitate to let us know if you need our assistance with anything else.

    Hello,
    Thanks for the reply to the breadcrumbs.
    On the other hand, how can I remove the duplicate property name for the author?
    Thanks

    Hello,

    We generate a schema to be compliant with Google’s documentation so having multiple name properties will not cause any issues.

    However, you can modify the schema by using this filter code:

    https://rankmath.com/kb/filters-hooks-api-developer/#change-post-schema-data

    Hope that helps and please do not hesitate to let us know if you need our assistance with anything else.

    Sorry, but the answer has nothing to do with my problem.
    Have you reviewed the page with my problem? It seems not.

    Hello,

    Here’s a filter to remove or change the name property from the author schema:

    add_filter( 'rank_math/snippet/rich_snippet_article_entity', function($entity) {
    	// Change
    	$entity['author'] = [
    			'@type' => 'Person',
    			'name'  => 'Author Name',
    			'@id' => 'https://mywebsite.com/other-url-custom'
    	];
    
    	// Remove
    	unset($entity['author']['name']);
    
    	return $entity;
    });

    Please note that as the structure is already valid, removing the property may cause warnings or errors from Rich Result Test.

    Hope that helps.

    Thank you.

    Hello,

    Since we did not hear back from you for 15 days, we are assuming that you found the solution. We are closing this support ticket.

    If you still need assistance or any other help, please feel free to open a new support ticket, and we will be more than happy to assist.

    Thank you.

Viewing 5 replies - 1 through 5 (of 5 total)

The ticket ‘Schema author name property has two entries on the About page’ is closed to new replies.