Home Forums Front-end Issues Print Checkboxes


Print Checkboxes

  • Hello everybody,

    I created some custom fields for my posts.
    Some of them are radio buttons, other are checkboxes.

    I want to show values on the loop of my post.

    I’m using Enfold theme, and I added code on postslider.php.

    For the radio buttons, I use this code to print:
    $output .= get_field('durata_evento', $entry->ID);

    For the checkboxes the same code doesn’t work, it only print text “Array”.
    Do you know what I should replace it with?


  • A checkbox field stores and array of the values selected. What you have to do to display those values depends on what you set for a return value. It allows requires a loop over the array. See the documentation.

Viewing 2 posts - 1 through 2 (of 2 total)

You must be logged in to reply to this topic.