• Resolved simplesteps

    (@simplesteps)


    How can I forbid the schema snippet to show the author, any time I enable “Schema (Structured Data)” all pages start to show a script snippet and in this snippet it has a part that is:

    {“@type”:”Person”,”@id”:”https://domain.com/author/jack/”,”name”:”jack”,”url”:”https://domain.com/author/jack/”,”image”:…..

    Every time I add enable this schema, I start getting attempts of password reset, I need to keep any author or user name from been displayed to the public even on snippets, is there any way to enable the schema without having authors been shown?

Viewing 4 replies - 1 through 4 (of 4 total)
  • Plugin Support Jaideep Asrani

    (@jaideeprm)

    Hello @simplesteps,

    Thank you for contacting Rank Math support.

    You can change the Display Name in the user profile setting to something else than the username and it will be updated in the Schema. If you want to remove the Person Schema from the site, you can use the following filter:

    add_filter( 'rank_math/json_ld', function( $data, $jsonld ) {
    unset($data['ProfilePage']);
    return $data;
    }, 99, 2);

    Here is how to add a filter to your site: https://rankmath.com/kb/wordpress-hooks-actions-filters/

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

    Thread Starter simplesteps

    (@simplesteps)

    Thank you for the reply, I added the code to the function.php of the theme, the person is gone but I notice the author still is showing up:

    { "@type": "Article", "headline": "Test title - ABC", "keywords": "digital,test", "datePublished": "2024-06-20T10:40:22-04:00", "dateModified": "2026-03-10T07:38:06-04:00", "author": { "@id": "https://domain.com/author/joedoe/", "name": "joedoe" }, "publisher": { "@id": "https://domain.com/#testing" },

    Can the author be turned off as well?

    Plugin Support Jaideep Asrani

    (@jaideeprm)

    Hello @simplesteps,

    It isn’t recommended to remove the author property from the Article Schema. You should change the display name in the user profile if you don’t want to use the username. If you want to remove the author property, you can use the following filter:

    add_filter( "rank_math/snippet/rich_snippet_article_entity", function( $entity ) {
    unset($entity['author']);
    return $entity;
    });

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

    Plugin Support Rakibuzzaman Siam

    (@rakibuzzamansiam1)

    Hello @simplesteps,
     
    Since we have not heard back from you, we are going to close this thread for now. If you still need any assistance, please feel free to reopen this thread or create a new one, and we will be happy to help.
     
    Thank you.

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

You must be logged in to reply to this topic.