Instructions for fake evaluation schema
ARTRU

In addition to using plugins kk Star Ratings To create reviews for your website, you can also use code to create virtual reviews.
I do not recommend this method for large, reputable sites. It's okay to play and test for fun.
Insert the code below into the file function.php
or use plugins Code Snippets.
In some cases the title is not taken exactly as post_type
Now you can replace it. the_title()
wall wp_get_document_title()
or wp_title()
.
function artru_fake_rating_schema() {
ob_start(); ?>
<script type="application/ld+json">
{
"@context":"https://schema.org/",
"@type":"CreativeWorkSeries",
"name":"<?php the_title(); ?>",
"aggregateRating":
{
"@type":"AggregateRating",
"ratingValue":"5",
"bestRating":"5",
"ratingCount":"999"
}
}
</script>
<?php return ob_get_clean();
}
add_action('wp_head', function(){
echo artru_fake_rating_schema();
});
Related Articles