How to add organization schema to Rich Snippet Tab

#22894
  • Resolved Support
    Rank Math pro
    Content AI Starter

    Hi folks,

    First thanks for the great plugin… It is a joy.

    I have a local business directory, when I select rich snippets I mis the organization schema. Is there a way to add that??

    Looking at some posts I expect that it is possible, but how do I do it so the option becomes available in the rich snippet tab.

    Thanks in advance.
    H

Viewing 7 replies - 1 through 7 (of 7 total)
  • Hello,

    Thank you for contacting Rank Math today.

    Rank Math will add the local business schema to your homepage, contact and about page by default and thus you do not to add this snippet on other pages.
    To fill the schema data, please navigate to Dashboard > Rank Math > Titles & Meta > Local SEO

    Looking forward to helping you. Thank you.

    ​​​​​​

    Support
    Rank Math pro
    Content AI Starter

    Hi Michael,

    I think I have not explained myself properly.

    The idea is to add organisation details to each business listing in the directory….

    Dayboro

    At the moment RankMath allows me to add the snippet to the individual listing, using any of the standard ones like restaurant, service etc I like to be able to add organisation to that list, so I can add individual organisation information to the listing.

    Each listing is like an individual post, to which I want to add the organisation snippet. It works for the restaurant listings.

    Birches Restaurant (although it does not allow for image attribut).

    I hope this makes it clearer?

    Thanks
    H

    Hello,

    Thank you for contacting Rank Math today.

    The organization schema is not available for selection from the Rank Math metabox. You can however make use of the following filter on your theme’s functions.php file to extend the schema and add the custom data:

    /**
     * Collect data to output in JSON-LD.
     *
     * @param array  $unsigned An array of data to output in json-ld.
     * @param JsonLD $unsigned JsonLD instance.
     */
    add_filter( 'rank_math/json_ld', function( $data, $jsonld ) {
    	return [];
    }, 10, 2);

    Looking forward to helping you. Thank you.

    ​​​​​​

    Support
    Rank Math pro
    Content AI Starter

    Hi Michael

    Thanks so much for the reply.

    Where do I add the organisation data? (Sorry I am a noob with this stuff).

    Do I put the schema data/fields for organisation, do you have an example…. please.

    Thanks
    H

    Hi there,

    Thanks for the follow up.

    As a disclaimer, this may end up hurting your SEO. The organization schema should not exist on multiple/all pages on your site. I came across this article that explains this in detail:
    https://www.searchenginejournal.com/google-do-not-put-organization-schema-markup-on-every-page/289981/#close

    Here is an example of how this would look if you would like to add additional schema data:

    /**
     * Collect data to output in JSON-LD.
     *
     * @param array  $unsigned An array of data to output in json-ld.
     * @param JsonLD $unsigned JsonLD instance.
     */
    add_filter( 'rank_math/json_ld', function( $data, $jsonld ) {
    	if(is_singular('listing')){
    	$data['Organization'] = [
    			'@context' => 'https://schema.org',
    			'@type'    => '',
    			'@id'      => '',
    			'name'     => '',
    			'url'      => '',
    			'sameAs'   => '',
    		];
    	return $data;
    	}
    	return [];
    }, 10, 2);

    I hope this info helps. Thank you.

    Support
    Rank Math pro
    Content AI Starter

    Thank you so much.
    h

    Hello,

    We are super happy that this resolved your issue. If you have any other questions in the future, know that we are here to help you.

    If you don’t mind me asking, could you please leave us a review (if you haven’t already) on https://wordpress.org/support/plugin/seo-by-rank-math/reviews/?rate=5#new-post about your overall experience with Rank Math? We appreciate your time and patience.

    If you do 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 7 replies - 1 through 7 (of 7 total)

The ticket ‘How to add organization schema to Rich Snippet Tab’ is closed to new replies.