Thanks Leo for your input, I tried all those but didn’t work.
I got this from Tanushka and it works:
<?php $key = get_post_meta($post->ID, 'sample_case', false);
$first = true;
foreach( $key[0] as $k){
if($first){
echo $k;
$first = false;
}else{
echo ', '.$k;
}
}
?>
It works like a charm 🙂
Thanks Leo for your input.
I know if I put the $single to “true” that it works, but it works only with showing up one value. In my case either Sample case 1 or Sample case 2, but that option can’t show up both at the same time.
In ACF I created Select (under Choice) and the values I inserted in the Choices field are like this:
Sample case 1 : Sample case 1
Sample case 2 : Sample case 2
Sample case 3 : Sample case 3
replacing my code with the_field (‘sample_case’);
where should I put that?
Thanks