• Resolved Reza

    (@reza5180)


    Hi, I want to set value the following variables with the help of the plugin.

    itemscope itemtype=”http://schema.org/AggregateRating”
    itemprop=”reviewCount”
    itemprop=”ratingValue”

    I used the following command in Post Ratings Templates, but did not get my result :

    %RATINGS_IMAGES_VOTE% (%RATINGS_USERS% votes, average: <strong itemprop=”ratingValue”>%RATINGS_AVERAGE% از <strong itemprop=”reviewCount”>%RATINGS_MAX%)<br />%RATINGS_TEXT%

Viewing 3 replies - 1 through 3 (of 3 total)
  • Plugin Author Lester Chan

    (@gamerz)

    Sorry that is not possible itemprop will get filtered out as it is not whitelisted. Structured Data is already in the code.

    See https://github.com/lesterchan/wp-postratings/blob/master/wp-postratings.php#L1153

    Thread Starter Reza

    (@reza5180)

    So, There is no solution? how do I optimize the pages with the AggregateRating filter? For example with jason-ld
    what is ratingValue and reviewCount in plugin?

    • This reply was modified 8 years, 9 months ago by Reza.
    Plugin Author Lester Chan

    (@gamerz)

    Sorry I don’t have any solution for you. You can disable the plugin auto Rich Text Snippet and use JSON-LD yourself in the post.

    You can get the ratings details easily

    
    get_post_meta( get_the_ID(), 'ratings_users', true ); // Gives you total users rated.
    get_post_meta( get_the_ID(), 'ratings_average', true ); // Gives you average
    
Viewing 3 replies - 1 through 3 (of 3 total)

The topic ‘Use the plugin in Google Structured Data’ is closed to new replies.