Add service area schema to a Service schema

#421315
  • Resolved Ross
    Rank Math free

    Hello in many pages of my website I am using a Service schema. On some of them I would like to add a specific serviceArea schema inside of the Service schema.
    How can I do it?

    What I am trying to say to Google is that a specific service is provided to a certain area.

    Thanks

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

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

    You can add that using our Advanced Schema builder as you can see in our guide here: https://rankmath.com/kb/rich-snippets/#advanced-schema-editor

    However, this is only available for PRO users.

    You can further extend your schema structure by applying this filter:

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

    Here is a guide you can follow to add the filter into your website:
    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.

    Ross
    Rank Math free

    An area for this page is called “Arroyomolinos”. What should I put inside of that snippet you provided to me. My intention is use different serviceArea in each page.

    Nigel
    Rank Math business

    Hello,

    Sorry to disappoint you but we cannot provide the exact code needed for extending your service schema as it varies between sites and would require customization which is beyond the scope of our support. If you have coding skills, you can add a troubleshooting line to the code to reveal the schema structure and make it easier for you as shown below:

    
    add_filter( 'rank_math/json_ld', function( $data, $jsonld ) {
    	echo "<pre>",var_dump($data),"</pre>";
    	return $data;
    }, 99, 2);
    

    Hope that helps. Please let us know if you have questions.

    Ross
    Rank Math free

    You have helped me many times with exact code. But as I understand this time you just don’t want. 🙁

    Thanks anyway!

    Nigel
    Rank Math business

    Hello,

    We try our best to help whenever possible with snippets that are already made but in this case there are some unique customizations that may need extended time to adjust and work correctly.

    Please do let us know if you need help with anything else.

    Ross
    Rank Math free

    Thanks:(

    Nigel
    Rank Math business

    Hello,

    I truly am sorry to close this thread to replies. If you need help again in future do let us know so we can make it up to you.

    Thank you.

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

The ticket ‘Add service area schema to a Service schema’ is closed to new replies.