Support

Account

Forum Replies Created

  • 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.

Viewing 1 post (of 1 total)