schema

#407123
  • Resolved Chris Njigha
    Rank Math free

    Hi,

    I need some help editing or removing some schema that was added to my website homepage.
    Currently there is article schema which contains false author information that needs to changed. When I removed the article schema option within edit page section, it didn’t fix the issue. How do I go about this?

    Chris

Viewing 6 replies - 1 through 6 (of 6 total)
  • By the way, the website is http://www.thecupcoffeehouse.com
    And the schema was added using RankMath, if you check it using the schema.org validator tool

    Hello,

    Thank you for contacting the support, and sorry for any inconvenience that might have been caused due to that.

    You would need a filter to change the Author ID or it’s URL. Please refer to my filter below and apply it into your theme’s functions.php or you can make use of Snippets Code plugin.

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

    Hope that helps.

    Looking forward to helping you.

    Ok thank you!
    So which parts of your code am I supposed to fill in with my desired changes?

    Also, is it possible to get rid of the author information all together?

    Chris

    Hello,

    In the filter above, you may need to edit the Author name and the https://mywebsite.com/other-url-custom parts.

    Meanwhile, you can use this filter to remove the author details from the Schema:

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

    I hope that helps.

    Thank you.

    So I tried the first filter and changed the author URL for Jules Winnfield to https://www.thecupcoffeehouse.com/author/jules-winnfield

    But it doesn’t look like it worked. Did I do something wrong? Here is an image of the code.

    https://www.screencast.com/t/KEOwuy11J

    Hello,

    I tested the filter code from my end using the Snippet Code plugin and it worked fine from my end.

    Can you please try clearing your website cache and check again?

    If the issue persists, we might need to take a closer look at the settings. Please edit the first post on this ticket and include your WordPress login in the designated Sensitive Data section.

    Please do take a complete backup of your website before sharing the information with us.
    Sensitive Data Section

    It is completely secure and only our support staff has access to that section. If you want, you can use the below plugin to generate a temporary login URL to your website and share that with us instead:

    https://wordpress.org/plugins/temporary-login-without-password/

    You can use the above plugin in conjunction with the WP Security Audit Log to monitor what changes our staff might make on your website (if any):

    https://wordpress.org/plugins/wp-security-audit-log/

    We really look forward to helping 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 6 replies - 1 through 6 (of 6 total)

The ticket ‘schema’ is closed to new replies.