RankMath Company / Organization areaServed Property?

#19488
  • Resolved Morganlindy
    Rank Math free

    Is there a way to configure important schema.org attributes like “areaServed” etc. in RankMath? I cannot seem to find the ability to add anything more than the generic “article” “service” etc. and for some clients this is pretty crucial as their offerings are regionally located by state, city, etc.

    Any advice on this would be greatly appreciated. Thanks!

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

    Thank you for contacting Rank Math today.

    We do not yet have an option to achieve this via the UI but you can make use of the following filter to extend the schema data on your posts:

    /**
     * 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.

    ​​​​​​

    Hi Michael, hello Morganlindy.

    I apologize for entering this topic.

    It’s very interesting what you write Michael, but where is this filter added?
    Regards

    Hi EdTrejo,

    Thanks for getting in touch.

    This code should be used in your theme’s functions.php file. You will then need to customize and submit the additional schema data to the $data variable.

    I hope this info helps. Thank you.

    Thank you Michael, I will try.
    Regards

    Hello,

    I am glad that this info was helpful.

    Feel free to open a new ticket for any other questions, comments or suggestions.

    Thank you.

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

The ticket ‘RankMath Company / Organization areaServed Property?’ is closed to new replies.