• Resolved parockinger

    (@parockinger)


    Hello, we would like to mark our comments as User Generated Content (UGC) for Google so that they can see that from this section onwards they are reviews. 
    
    Where and how can we share this? Can we write this down in function.php? 
    
    Here is our code:
    
    add_filter( 'rank_math/snippet/rich_snippet_recipe_entity', function( $entity ) {
    
        $entity['aggregateRating'] = [
    
            '@type' => 'AggregateRating',
    
            'ratingValue' => $score = get_post_meta(get_the_ID(), '_glsr_average', true),
    
            'ratingCount' => $count = get_post_meta(get_the_ID(), '_glsr_reviews', true),
    
            'bestRating' => '5',
    
            'worst rating' => '1',
    
        ];
    
        return $entity;
    
    });
    
    Thank you and best regards

    The page I need help with: [log in to see the link]

Viewing 1 replies (of 1 total)
  • Plugin Author Gemini Labs

    (@geminilabs)

    Why not just enable the RankMath integration and then enable the schema option on the shortcode?

    For example: [site_reviews schema="true"]

Viewing 1 replies (of 1 total)

The topic ‘User Generated Content’ is closed to new replies.