Local Schema error

  • I am finding an error with structured data. My website is using ‘medical clinic’ for business type and returns the following errors in structured data testing tool
    – ‘The priceRange field is recommended. Please provide a value if available.’ – though this has been set through RankMath
    – ‘The telephone field is recommended. Please provide a value if available.’ – though this has been set and appears under contactPoint
    – ‘A value for the image field is required.’ – there is nowhere to set an image beyond the logo for this one in RankMath

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

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

    This issue might be related to caching on your site. Please purge all your site cache and test this again and let us know if the errors are still reported.

    Looking forward to helping you. Thank you.


    Hi, I assure you this is not a cache issue. RankMath is not appropriately filling out the structured data code for these fields (I would assume that the last should be solved by setting the featured image as the image but there is no actual setting for this in the back end of RankMath that I can find)


    Thanks for follow up. we might need to take a closer look at the settings. Please edit the first post on this ticket and include your WP logins in the designated Sensitive Data section.
    Sensitive Data Section

    It is completely secure and only our support staff has access to that section. If you want, you can use the below plugin to generate a temporary login URL to your website and share that with us instead:


    You can use the above plugin in conjunction with the WP Security Audit Log to monitor what changes our staff might make on your website (if any):


    We really look forward to helping you.

    Perhaps first run the test yourself on your plugin with this local business setting. If you cannot replicate these errors then I will provide login


    Thanks for getting back to us.

    I have been able to reproduce only a single error and that is the missing priceRange value. I have submitted this to our dev team for closer investigation and we will be getting back to you in a short while.

    We appreciate your patience. Thank you.


    Thank you for letting us know about this issue. I’ve forwarded this to our Development Team and they will release an update soon with the fix. For now to fix the issue on your site, please add below filter code in your theme’s functions.php file:

    add_filter( 'rank_math/json_ld', function( $data, $jsonld ) {
    	if ( isset( $data['Organization'] ) && 'MedicalClinic' === $data['Organization']['@type'] ) {
    		$data['Organization']['image']      = isset( $data['Organization']['logo'] ) ? $data['Organization']['logo'] : '';
    		$data['Organization']['priceRange'] = RankMath\Helper::get_settings( 'titles.price_range' );
    		$phone_numbers = RankMath\Helper::get_settings( 'titles.phone_numbers' );
    		if ( ! empty( $phone_numbers ) ) {
    			$data['Organization']['telephone'] = isset( $phone_numbers[0]['number'] ) ? $phone_numbers[0]['number'] : '';
    	return $data;
    }, 99, 2 );

    This should fix the issue. If there is anything else, please let us know.

    Thank you.


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

The ticket ‘Local Schema error’ is closed to new replies.