• Resolved Ahmed Elgameel

    (@elgameel)


    Hi there,

    Is there an option to set the Rich Snippets content variables’ values?

    For example, I want to show 5 stars on my website but I want the schema/Rich Snippets to be 10 stars.

    Can you please tell me how to do so or provide me with Rich Snippets content that does what I want?

    Thanks in advance.

Viewing 4 replies - 1 through 4 (of 4 total)
  • Plugin Contributor Kamal Khan

    (@bhittani)

    Turn off rich snippets in the settings and manually show the ld+json code in your template file.

    E.g.

    
    <?php echo kksr('core.functions.ld_json')(['best' => 10]); ?>
    
    Thread Starter Ahmed Elgameel

    (@elgameel)

    Hi @bhittani

    Thanks for your work on the plugin and your reply.

    So, what exactly to add to my template if I want to show this schema code?

    {
        "@context": "https://schema.org/",
        "@type": "CreativeWorkSeries",
        "name": "{title}",
        "aggregateRating": {
            "@type": "AggregateRating",
            "ratingValue": "({score} * 2)",
            "bestRating": "({best} * 2)",
            "ratingCount": "{count}"
        }
    }
    

    Thanks in advance.

    Plugin Contributor Kamal Khan

    (@bhittani)

    You do not need to do anything else. Providing best will calculate the score automatically.

    • This reply was modified 2 years, 10 months ago by Kamal Khan.
    Thread Starter Ahmed Elgameel

    (@elgameel)

    Ok, thanks for your help @bhittani

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘Control Number of Stars in Rich Snippets’ is closed to new replies.