Support

Account

Home Forums General Issues Star rating Reply To: Star rating

  • The simplest solution is to use button group with 12345 buttons.

    <?php 
      $ratingstar = get_field('checked');
     ?>
       <span class="fa fa-star <?php if ($ratingstar >= 1) { echo 'checked';}?>"></span>
       <span class="fa fa-star <?php if ($ratingstar >= 2) { echo 'checked';}?>"></span>
       <span class="fa fa-star <?php if ($ratingstar >= 3) { echo 'checked';}?>"></span>
       <span class="fa fa-star <?php if ($ratingstar >= 4) { echo 'checked';}?>"></span>
       <span class="fa fa-star <?php if ($ratingstar == 5) { echo 'checked';}?>"></span>