Help to find the right custom field for brand

#643464
  • Resolved Anonymous
    Rank Math free

    Dear Support,

    I hope this message finds you well.

    Under Rank Math – General Settings – WooCommerce, there is an option to specify where Rank Math should retrieve brand data.

    Due to recent changes made using the ACF plugin to input brand information, we are experiencing difficulties in having Rank Math fetch the brand data.

    Please see the following url: https://imgur.com/a/0dyji23 to find some screenshots for reference.

    Could you kindly provide us with guidance on what needs to be filled in?

    Your assistance is greatly appreciated.

    Warm regards,

    Valentijn | Buro Vijfhoek

Viewing 3 replies - 1 through 3 (of 3 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.

    To retrieve the data from your ACF, you may need to use and customize this filter on your site:

    add_filter('rank_math/snippet/rich_snippet_product_entity', function ($entity) {
    	if (!is_product()) {
    		return $entity;
    	}
    
    $entity['brand'] = get_field('YOUR_BRAND_FIELD', get_queried_object_id());
    return $entity;
    });
    

    And here’s how you can add a filter:
    https://rankmath.com/kb/wordpress-hooks-actions-filters/

    Let us know how this goes.

    Thank you.

    Anonymous
    Rank Math free

    Thank you so much!

    Can you only let me know, what is the purpose of this? Is it a big SEO improvement to fix this issue?

    Hello,

    The filter will help you add the brand field to the Schema, which will help improve the product snippets and add the brand to them in the SERPs.

    Hope that helps and please do not hesitate to let us know if you need our assistance with anything else.

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

The ticket ‘Help to find the right custom field for brand’ is closed to new replies.