Wordpress Option tree checkbox

I created 4 checkboxes in option tree. But i dont know how to check if checked some one.

if ( get_option_tree( 'cehckboxes' ) == 1 ) {`
//do for first checkbox
}
if ( get_option_tree( 'cehckboxes' ) == 2 ) {
//do for second checkbox
}
if ( get_option_tree( 'cehckboxes' ) == 3 ) {
//do for 3. checkbox
}
if ( get_option_tree( 'cehckboxes' ) == 4 ) {
//do for 4. checkbox
}

I don’t think this is possible (see this issue). You’re better off using a single checkbox each.

1 Like

i found it.

$array = ot_get_option( 'checkboxesi', array() );

if ( in_array('1', $array ) ) {
...
}
1 Like