Hello,
Thank you for contacting Rank Math and bringing your concern to our attention. I’m sorry for the delay and for any inconvenience this issue may have caused you.
Those fields are required in the Article Schema to make it compliant and pass the tests in the Rich Results Test tool.
However, you can edit the @id
of your author by adding the following filter on your site:
add_filter( 'rank_math/json_ld', function( $data, $jsonld ) {
if ( ! isset( $data['ProfilePage'] ) ) {
return $data;
}
$data['ProfilePage']['@id'] = 'your-new-id-here';
$data['WebPage']['author']['@id'] = 'your-new-id-here';
return $data;
}, 99, 2);
And here’s a link to how to apply this to your site:
https://rankmath.com/kb/filters-hooks-api-developer/#adding-filters-and-hooks-in-rank-math-php
I hope that helps.
Thank you, and please don’t hesitate to contact us anytime if you need further assistance with anything else.
Hi Reinelle,
I’m a bit puzzled by this. I don’t understand what the new ID should be…
As I said, my author archive page redirects to the homepage. So I have no author archive page per se.
Hello,
Sorry for the confusion.
The filter above lets you customize/rename the ID field. If you wanted those to be removed, you would need like this one instead:
add_filter( 'rank_math/json_ld', function( $data, $jsonld ) {
if ( ! isset( $data['ProfilePage'] ) ) {
return $data;
}
unset( $data['ProfilePage']['@id'] );
unset( $data['WebPage']['author']['@id'] );
return $data;
}, 99, 2);
I hope this 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.