Add provider inside in all Service schemas

#516035
  • Resolved Ross
    Rank Math free

    Hello!

    I would like to add a provider on all Service schemas. Is this hook okay:

    add_filter( 'rank_math/snippet/rich_snippet_service_entity', function( $entity ) {
    $entity['provider']['@type'] = 'RoofingContractor';
    $entity['provider']['name'] = ['Tejados Madrid LISER','Tejados Madrid LISER 2'];
    return $entity;
    });

    or should it be this one:

    add_filter( 'rank_math/snippet/rich_snippet_service_entity', function( $entity ) {
    $entity['service']['provider']['@type'] = 'RoofingContractor';
    $entity['service']['provider']['name'] = ['Tejados Madrid LISER','Tejados Madrid LISER 2'];
    return $entity;
    });

    Thanks!

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

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

    It seems that you’re currently using the Rank Math PRO plugin, but the account you have used to open this ticket is the Rank Math free version.

    Can you please search and forward a receipt from FastSpring.com so we can locate your account and verify it?

    Back to your question, please try to use the following one to add provider on your Service schema:

    add_filter( 'rank_math/snippet/rich_snippet_service_entity', function( $entity ) {
    $entity['provider']['@type'] = 'RoofingContractor';
    $entity['provider']['name'] = ['Tejados Madrid LISER','Tejados Madrid LISER 2'];
    return $entity;
    });
    

    You can try to validate your Service Schema with Schema validator.

    Looking forward to helping you.

    Thank you.

    ​​​​​​​

    Ross
    Rank Math free

    Thanks

    Hello,

    Glad that helped.

    Please feel free to reach out to us again in case you need any other assistance.

    We are here to help.

    Thank you.

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

The ticket ‘Add provider inside in all Service schemas’ is closed to new replies.