Home Forums WoodMart support forum Rich Snippets: The brand is being misclassified

Rich Snippets: The brand is being misclassified

Viewing 6 posts - 1 through 6 (of 6 total)
  • Author
    Posts
  • #115485

    Felix
    Participant

    Hello,

    I have installed the plugin RankMath and noticed through the Google Search Console that the product “brand” is missing in Google Rich Snippets. It seems that the brand is being misclassified under “additionalProperty” instead of “brand”. (Screenshot attached)

    From RankMath I got the following code for the functions.php of the theme. But with it only “Rank Math” is registered as brand. So the value is not dynamically taken from the DB for every product.

    add_filter( 'rank_math/snippet/rich_snippet_product_entity', function( $entity ) {
    $entity['brand'] = 'Rank Math';
    return $entity;
    });

    I don’t think the solution lies in this code, but in the correct assignment.

    Can you guys help?

    Attachments:
    You must be logged in to view attached files.
    #115498

    Artem Temos
    Keymaster

    Hello,

    Could you please check how it works with some default WordPress theme like twentysixteen to understand is it our theme issue or not?

    Regards

    #115527

    Felix
    Participant

    Hi,

    sorry, I can’t switch to another theme on the live page.

    But the brand function is integrated in the theme and therefore part of Woodmart. So it doesn’t work with a standard theme like twentysixteen, I think.

    Could the problem be the taxonomy name? Because the brands names are stored under “pa_marke” and not under an English standard name (like e.g. pa_brand(s))?

    Maybe this prevents the correct assignment.

    #115547

    Artem Temos
    Keymaster

    Hi,

    Brands are just product attributes and they behave in the same way on all themes. Our theme just displays it in a different way but we don’t influence the schema markup.

    Regards

    #115765

    Felix
    Participant

    OK, I get it. Then woodmart is not optimized for search engine snippets.

    In this case the solution is probably the functions.php code. Any tip on how to get a dynamic brand entry there?

    #115773

    Artem Temos
    Keymaster

    It doesn’t mean that our theme is not optimized for search engines of course. Rich snippets come with WooCommerce plugin and if they don’t display their attributes it is not a theme issue.

    If you want to customize it by your own, you can find an example how to get the product brands in the file inc/integrations/woocommerce/modules/brands.php.

Viewing 6 posts - 1 through 6 (of 6 total)