David Jane I set the default of each value. to everyone encounter like this. just edit the the. <div>
<meta itemprop="name" content="<?php echo esc_attr(starstruck_get_microdata_name()); ?>">
<?php do_action('starstruck_microdata'); ?>
<div itemscope class="starstruck-wrap" itemprop="aggregateRating" itemtype="http://schema.org/AggregateRating">
<?php
$bestRating = 10;
$worstRating = 1;
$isDefaultRating = false;
if (empty($rating)) {
$rating = 5; // Set a default rating, e.g., 5
$votes = 1; // Set a default number of votes, e.g., 100
$isDefaultRating = true;
}
?>
<meta itemprop="bestRating" content="<?php echo $bestRating; ?>"/>
<meta itemprop="worstRating" content="<?php echo $worstRating; ?>"/>
<div class="dt_rating_data">
<?php echo starstruck_return_content_span($id, $rating, $type); ?>
<section class="nope starstruck-rating-wrap">
<?php if (starstruck_require_user_login()) : ?>
<?php echo apply_filters('starstruck_read_only_sidebar_notice', __d('Log in to vote')); ?>
<?php else: ?>
<?php _d('Your rating:'); ?> <span class="rating-yours"><?php echo $your_rating; ?></span>
<?php endif; ?>
</section>
<div class="starstruck-rating">
<span class="dt_rating_vgs" itemprop="ratingValue"><?php echo $rating; ?></span>
<i class="fas fa-user-circle"></i> <span class="rating-count" itemprop="ratingCount"><?php echo number_format($votes); ?></span> <span class="rating-text"><?php echo _n('vote', 'votes', $votes, 'dooplay'); ?></span>
<?php if ($isDefaultRating) : ?>
<span class="default-rating-label">(Default Rating)</span>
<?php endif; ?>
</div>
</div>
</div>
</div>