Support

Account

Home Forums General Issues WP loop via checkbox value Reply To: WP loop via checkbox value

  • while(){
    
    if( in_array( 'red', get_field('field_name_of_checkbox') ) )
    {
        //...Your code
    }
    
    }

    Be careful though because if there is nothing checked I think the field returns a string. This is off the top of my head. Not sure.