Hello,
Thank you for contacting Rank Math and sorry for any inconvenience that might have been caused due to that.
The author is a required part of the article schema which is usually taken from the settings of the user who publishes the post.
You can check out this article by google on structured data types: https://developers.google.com/search/docs/data-types/article
However, if you wish to proceed with removing the author, you may need to use a filter to remove the author schema. Please refer to the code below and insert it into your theme’s functions.php
file:
/**
* Filter to change the schema data.
* Replace $schema_type with schema name like article, review, etc.
*
* @param array $entity Snippet Data
*
* @return array
*/
add_filter( "rank_math/snippet/rich_snippet_{$schema_type}_entity", function ( $entity ) {
if ( isset( $entity['author'] ) ) {
unset( $entity['author'] );
return $entity;
}
return $entity;
} );
Please note you need to change the {$schema_type}
to the object type you wish to modify.
Hope this helps.
Looking forward to helping you.
Thank you.
/**
* Filter to change the schema data.
* Replace $schema_type with schema name like article, review, etc.
*
* @param array $entity Snippet Data
*
* @return array
*/
add_filter( "rank_math/snippet/rich_snippet_article_entity", function ( $entity ) {
if ( isset( $entity['author'] ) ) {
unset( $entity['author'] );
return $entity;
}
return $entity;
} );
this doesn’t work, its still showing written by in the preview links
Hello,
Could you please share the affected URL so we can check as well?
Looking forward to helping you.
Thank you.
Hello,
I have updated the sensitive data as requested. Can you please check further?
Thank you.
Hello,
Could you please confirm if you are referring to the author under the WebPage schema? If so, you may use this filter as well:
add_filter( 'rank_math/json_ld', function( $data, $jsonld ) {
unset($data['WebPage']['author']);
return $data;
}, 99, 2);
Let us know how that goes. Looking forward to helping you with this one.
honestly all I had to do was unlock the enhanced slack schema…found it on my own thanks
Hello,
Glad that everything is sorted now.
Please feel free to reach out to us again in case you need any other assistance.
We are here to help.
Thank you.