There is a code (shown below), a part of which should display this here: Based on the reviews: 1. But I want to add color to the number - <div style="color:#03CA41;"> %d</div> . But the page displays an inscription with divas: На основании отзывов:<div style="color:#03CA41;"> 1</div> . Please help me how to properly implement, not strong in PHP.
<article> <h2><?php echo ucfirst($review_item_title); ?></h2> <div class="score"> <?php $review_score = $entity_obj->get_custom_field('review_score', false, true); $score_out_of_10 = round($review_score * 10); ?> <span class="achieved"><?php echo esc_html($score_out_of_10); ?></span><span> / 10</span> <p class="info"><?php echo sprintf(esc_html__('На основании отзывов:<div style="color:#03CA41;"> %d</div>', 'bookyourtravel'), $reviews_total); ?></p> <p class="disclaimer"><?php echo sprintf($guest_reviews_info, $entity_obj->get_title()); ?></p> </div> <dl class="chart"> <?php $total_possible = $reviews_total * 10; $review_fields = $bookyourtravel_review_helper->list_review_fields($post_type, true); foreach ($review_fields as $review_field) { $field_id = $review_field['id']; $field_value = intval($total_possible > 0 ? ($bookyourtravel_review_helper->sum_review_meta_values($base_id, $field_id) / $total_possible) * 10 : 0); $field_label = isset($review_field['label']) ? $review_field['label'] : ''; $field_label = $bookyourtravel_theme_of_custom->get_translated_dynamic_string($bookyourtravel_theme_of_custom->get_option_id_context($context_option_id) . ' ' . $field_label, $field_label); ?> <dt><?php echo esc_html($field_label); ?></dt> <dd><span><?php echo $field_value; ?> </span></dd> <?php } ?> </dl> </article>