• Hello,

    I don’t manage to do a simple thing… I finded all the morning but nothing. I’d like to show values (taxonomy) in my single.php from a checkbox.

    How you do that ? I tried that for example an nothing :

    $field_obj = get_field_object('type_metier');
    $metiers = get_field('type_metier'); // array of selected color values 
    
    foreach($metiers as $val) {
        print $val;
    }

    Thanks for you help,
    Jonathan

    https://www.ads-software.com/plugins/advanced-custom-fields/

Viewing 1 replies (of 1 total)
  • Hi, have you tried putting a var_dump($metiers); into your code just to see what the array looks like (and to make sure your current post really does have some colors set in the ‘type_metier’ field.

    I’m not sure why you have the line starting $field_obj as you don’t then seem to use it.

Viewing 1 replies (of 1 total)
  • The topic ‘Showing values from a checkbox’ is closed to new replies.