areaServed info

#1015880
  • Resolved Steve Edney
    Rank Math free

    Sorry to trouble you. I asked this to your AI but I still can’t find the answer.
    I want to add areaServed to a page’s schema. I have the “service” schema chosen, but can’t see the option.
    Your AI gave me this answer but I also can’t see that option. Is it only available in the “Pro” version perhaps?
    AI answer:
    “Yes, you can enter areaServed for a service schema in Rank Math. This feature is available in both the free and pro versions of Rank Math. You can add the areaServed property to your Local Business Schema, which helps define the geographic area where your services are provided.

    For more detailed instructions on how to add areaServed, you can refer to the following articles:

    How to Create Multiple Locations (with Schema) Using Rank Math
    Add Multiple “areaServed” Cities to Your LocalBusiness Schema”

Viewing 1 replies (of 1 total)
  • Hello,

    Thank you for your query, and we are so sorry about the trouble this must have caused.

    The advice from Rankbot is not relevant since you already have existing pages or you’re mainly using service schema.

    You can still follow this tutorial for the areaServed property to add this to the LocalBusiness Schema of the entire website, which would then include all locations that you serve on top of the Service Schema for the particular location pages.

    Alternatively, you can modify and use the following filter to add the areaServed property to our default LocalBusiness Schema beside the Service schema you have:

    add_filter( 'rank_math/json_ld', function( $data, $jsonld ) {
        if ( isset( $data['publisher'] ) ) {
            $data['publisher']['areaServed'] = [ 
    			['@type' => 'city',
    			 'name'  => 'Prescott',
    			 'sameAs'=> 'https://en.wikipedia.org/wiki/Prescott,_Arizona'],
    		    ['@type' => 'city',
    			 'name'  => 'Prescott Valley',
    			 'sameAs'=> 'https://en.wikipedia.org/wiki/Prescott_Valley,_Arizona']
    										   ];
    										   
        }
        return $data;
    }, 99, 2 );

    You may refer to this guide on how to add filters to your website: https://rankmath.com/kb/wordpress-hooks-actions-filters/

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

    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 1 replies (of 1 total)

The ticket ‘areaServed info’ is closed to new replies.