Viewing 1 replies (of 1 total)
  • Plugin Author Rank Math

    (@rankmath)

    Hello @nicomollet

    Thank you for contacting the support and sorry for the issue you are facing.

    It seems like an issue in the plugin. It shall be fixed in an upcoming update, which is set to release this week.

    In the meantime, please add the following code in your theme’s functions.php file to fix the error:

    add_filter( 'rank_math/json_ld', function( $data, $jsonld ) {
    	if ( isset( $data['Organization'] ) && 'DryCleaningorLaundry' === $data['Organization']['@type'] ) {
    		if ( isset( $data['Organization']['logo'] ) ) {
    			$data['Organization']['image'] = $data['Organization']['logo'];
    			unset( $data['Organization']['logo'] );
    		}
    
    		if ( isset( $data['Organization']['contactPoint'] ) ) {
    			$data['Organization']['telephone'] = $data['Organization']['contactPoint'][0]['telephone'];
    			unset( $data['Organization']['contactPoint'] );
    		}
    	}
    
    	return $data;
    }, 99, 2);

    Hope that helps. If there’s anything else, please feel free to let us know. We would be more than happy to assist.

Viewing 1 replies (of 1 total)
  • The topic ‘Local business mandatory fields’ is closed to new replies.