Adding Filter to update the sameAs Schema for Social Profiles to show on Google

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

    Thank you for contacting Rank Math and bringing your concern to our attention. I’m sorry for any inconvenience this issue may have caused you.

    I’ve checked your site, and it seems that you’re using Organization. Since the Organization is the publisher, please update the words Organization to publisher instead.

    The filter should look like this:

    add_filter( 'rank_math/json_ld', function( $data, $jsonld ) {
        if ( isset( $data['publisher'] ) ) {
            $data['publisher']['sameAs'] = ['https://twitter.com/RankMath'];
        }
        return $data;
    }, 99, 2 );

    Once done, you can verify the SameAs data using the Google’s Rich Results test tool.

    I hope that helps.

    Thank you.

    Dylan
    Rank Math free

    Hi Reinelle,

    Thanks for the quick response! That looks like it helped! The code is now showing up in the sameAs within the Google’s Rich Results test tool. Though I still don’t notice the social profiles on my Google My Business Profile. How long does it take for this code to work and be seen by Google?

    Let me know, thanks!

    Hello,

    After you’ve done the change if you would like to suggest them to Google you can follow the steps here: https://support.google.com/knowledgepanel/answer/7534842#zippy=%2Csocial-profiles

    This doesn’t guarantee that it will update the panel but it’s a good idea to perform these tasks to help Google better understand the social profiles attached to your business.

    Don’t hesitate to get in touch if you have any other questions.

    Dylan
    Rank Math free

    Hi Miguel,

    Thanks for the help! The schema code works, now just have to wait on Google to crawl the website and see the code, and put the social profiles on my Google My Business Profile.

    Hello,

    We are super that we could address your concern. Please do let us know how that goes.

    If you have another question in the future, please feel free to create a new forum topic, and it will be our pleasure to assist you again.

    Thank you.

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

You must be logged in to reply to this ticket.