Add Brand Name for Products

#554602
  • Resolved Anonymous
    Rank Math free

    Hi there !

    can you pls help me with the brand name change.

    I entered this code in functions.php for Astra theme it did not work, Astra support told me to check with Storefront theme – I switched to test – it did not work, so they are not sure how to help me.

    /**
    * Filter to add Brand Name for Products.
    *
    * @param array $entity Snippet Data
    * @return array
    */
    add_filter( ‘rank_math/snippet/rich_snippet_product_entity’, function( $entity ) {
    $entity[‘brand’][‘@type’] = ‘Brand’;
    $entity[‘brand’][‘name’] = ‘Rank Math’;
    return $entity;
    });

Viewing 1 replies (of 1 total)
  • Hello,

    Thank you for contacting Rank Math and bringing your concern to our attention. I’m sorry for any inconvenience this issue may have caused you.

    I’ve checked the filter, and it seems to be working fine. Please ensure that the single quotation marks are applied correctly. You can copy and paste this one directly:

    /**
    * Filter to add Brand Name for Products.
    *
    * @param array $entity Snippet Data
    * @return array
    */
    add_filter( 'rank_math/snippet/rich_snippet_product_entity', function( $entity ) {
    $entity['brand']['@type'] = 'Brand';
    $entity['brand']['name'] = 'Rank Math';
    return $entity;
    });

    Also, change the word Rank Math to your actual Brand name.

    If the issue still persists, please share the product URL so we can check and verify it as well.

    Looking forward to helping you.

    Thank you.

    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 ‘Add Brand Name for Products’ is closed to new replies.