Home › Forums › Front-end Issues › Multiple checkbox (array in front-end) › Reply To: Multiple checkbox (array in front-end)
Hi,
I am using this code. But I need to show more than one field, how do I do this? The next field I’ve added is showing as empty in the front-end. Here is the code I have:
function woo_new_product_tab_content() {
$field_name = "gate_usage";
$fields = get_field($field_name);
if($fields){
echo '<li>';
foreach ($fields as $field){
echo $field['value'] . ' ';
}
echo '</li>';
}
$field_name = "motor_supply";
$fields = get_field($field_name);
if($fields){
echo '<li>';
foreach ($fields as $field){
echo $field['value'] . ' ';
}
echo '</li>';
}
}
Why is it not working please?
Thanks.
Welcome to the Advanced Custom Fields community forum.
Browse through ideas, snippets of code, questions and answers between fellow ACF users
Helping others is a great way to earn karma, gain badges and help ACF development!
We use cookies to offer you a better browsing experience, analyze site traffic and personalize content. Read about how we use cookies and how you can control them in our Privacy Policy. If you continue to use this site, you consent to our use of cookies.