Missing Aggregate rating

#493453
  • Resolved Lari Salminen
    Rank Math free

    Hi guys!

    I’m using the Pro version and would like to use the rich snippets from you.
    I have a rating plugin today that is handling the rich snippets, but only a small part of all the snippets, that’s why I want to use your function instead.

    But, if I turn off the ones from Rate my Post – WP Rating System and activate your rich snippets, then I don’t get the aggregate rating to show.
    That is a important part since I’m using the recipe schema.

    How can I fix this?

    It would be SO nice to be able to only use your plugin for schema markup.

    My site: http://www.lchfarkivet.se

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

    You mentioned you’re using the Rank Math PRO, 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?

    Meanwhile, you can use this filter to pass the data from the Rate My Post plugin (Product Schema):

    add_filter( 'rank_math/snippet/rich_snippet_product_entity', function( $entity ) {
        $entity['aggregateRating'] = [
    	'@type'       => 'AggregateRating',
    	'ratingValue' => rmp_get_avg_rating(),
    	'bestRating'  => '5',
    	'worstRating' => '1',
    	'ratingCount' => rmp_get_vote_count(),
        ];
        return $entity;
    });

    The filter should be added to your active theme’s functions.php file (last line).

    Here’s another way to apply the filter using the rankmath.php file:
    https://rankmath.com/kb/filters-hooks-api-developer/#adding-filters-and-hooks-in-rank-math-php

    Let us know how this goes.

    Thank you.

    Lari Salminen
    Rank Math free

    Hi!

    Thank you for the response.

    I have added that code to my functions.php. Deactivated schema output in Rate My Post and then activated schema output in Ran Math, but now there is nothing at all.

    I’m using recipe schema.

    https://validator.schema.org/#url=https%3A%2F%2Fwww.lchfarkivet.se%2Frecept%2Fflaskfilegryta%2F

    Regarding my PRO license…
    I have gotten it from my host, that is using Festinger Vault.

    Lari Salminen
    Rank Math free

    Had to remove it all again…
    But did set it up on my test site instead.

    https://validator.schema.org/#url=https%3A%2F%2Ftest.lchfarkivet.se%2Frecept%2Frabiff%2F

    But, Rank Math won’t work as it should on my site.
    If I click on preview in a post, then all the options for Rank Math goes away.

    Hello,

    We might need to take a closer look at the settings. Please edit the first post on this ticket and include your WordPress logins in the designated Sensitive Data section.

    Please do take a complete backup of your website before sharing the information with us.
    Sensitive Data Section

    It is completely secure and only our support staff has access to that section. If you want, you can use the below plugin to generate a temporary login URL to your website and share that with us instead:

    https://wordpress.org/plugins/temporary-login-without-password/

    You can use the above plugin in conjunction with the WP Security Audit Log to monitor what changes our staff might make on your website (if any):

    https://wordpress.org/plugins/wp-security-audit-log/

    We really look forward to helping you.

    Lari Salminen
    Rank Math free

    Hello,

    I have updated the sensitive data as requested. Can you please check further?

    Thank you.

    Hello,

    The schema structure on your live website is currently disabled as you can see in the screenshot below:

    schema

    Can you please share the admin login for the test/staging website you created instead so we can debug the issue there?

    Looking forward to helping 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 6 replies - 1 through 6 (of 6 total)

The ticket ‘Missing Aggregate rating’ is closed to new replies.