Hi,
Earlier below code was working well but today we saw displaying ACF Values instead of ACF Labels at our website. We have used below codes to display ACF choices.
//Products Hair Type
$hairs = get_field('products_hair_type');
$num_of_items_hair = count($hairs);
$num_count_hair = 0;
if( $hairs ): ?>
<strong>Hair Type:</strong>
<?php foreach( $hairs as $hair ):
echo $hair;
$num_count_hair = $num_count_hair + 1;
if ($num_count_hair < $num_of_items_hair) {
echo ", ";
}
endforeach;
?> <br />
<?php endif;
At Choices products_hair_type we have as below:
all_hair_types : All Hair Types
dry_hair : Dry Hair
dull_hair : Dull Hair
fizzy_hair : Fizzy Hair
flat_hair : Flat Hair
normal_hair : Normal Hair
oily_hair : Oily Hair
thin_hair : Thin Hair
We need to display All Hair Types instead of all_hair_types and more selected choices if another too. Can you please suggest solutions in this matter.
Example Link:
https://www.hamroshringar.com/product/bare-anatomy-volumizing-hair-shampoo-250-ml/
Hoping for the solution.
Thank You,
Bibhash Karn