How can get a Site Navigation Schema on my website using Rank Math

  • Hello,
    I’ve been using the Rank Math Plugin for the last 1 month and am loving it. But Can you help me to get a Site Navigation Schema on my website which is https://indianshoppersguide.in ?

    When I try to edit the Schema of Homepage there is no organization Schema. So what should I do to get a Site Navigation Schema for Homepage?

    Thanks

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

    Thank you for getting in touch and I am extremely sorry about the trouble this might have caused.

    I am sorry but the site navigation schema is not currently available in Rank math.

    Assuming you wish to add this to gain sitelinks, I’d like to note that this doesn’t actually influence the sitelinks currently you can check this thread: https://support.google.com/webmasters/thread/13954295?hl=en. Rank math usually adds the sitelinks searchbox for this.

    If you still wish to add this schema to your site, you can generate this schema by following this guide: https://schema.org/SiteNavigationElement then use the following filter to extend Rank math schema:

    
    /**
     * 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 [];
    }, 99, 2);
    

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

    Where should I put this code?
    functions.php?

    Hello,

    Yes,It should be added in theme’s functions.php file. You should however customize it accordingly.

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

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

You must be logged in to reply to this ticket.