Title: Checkbox list problem
Last modified: August 30, 2016

---

# Checkbox list problem

 *  [ludo2604](https://wordpress.org/support/users/ludo2604/)
 * (@ludo2604)
 * [10 years, 7 months ago](https://wordpress.org/support/topic/checkbox-list-problem/)
 * Hi there,
 * I have a WordPress Theme with metabox.
 * I want to change an array from select to checkbox_list
 * but it doesn’t work 🙁
 * here is the cod
 * ‘$departments = get_posts($args); //new WP_Query($args);
    $departments_options
   = array(); $departments_options[] = array(‘label’=>__(‘Select Department…’,’noo’),’
   value’=>”); if(!empty($departments)){ foreach ($departments as $department){ //
   $departments_options[] = array(‘label’=>$department->post_title,’value’=>$department-
   >ID); $departments_options[] = array($departement->ID => $departement->post_title);
 *  }
    }
 *  // $helper->add_meta_box( $meta_box );
    $meta_box = array( ‘id’ => “{$prefix}
   _meta_box_noo_doctor”, ‘title’ => __(‘Doctor Information:’, ‘noo’), ‘fields’ 
   => array( array( ‘id’ => ‘_department’, ‘label’ => __( ‘Departments’, ‘noo’ ),‘
   type’ => ‘checkbox_list’, ‘options’=>$departments_options ),’
 * [https://wordpress.org/plugins/meta-box/](https://wordpress.org/plugins/meta-box/)

Viewing 1 replies (of 1 total)

 *  Plugin Author [Anh Tran](https://wordpress.org/support/users/rilwis/)
 * (@rilwis)
 * [10 years, 7 months ago](https://wordpress.org/support/topic/checkbox-list-problem/#post-6666711)
 * I’ve just answered on Github, please take a look:
 * [https://github.com/rilwis/meta-box/issues/673](https://github.com/rilwis/meta-box/issues/673)

Viewing 1 replies (of 1 total)

The topic ‘Checkbox list problem’ is closed to new replies.

 * ![](https://ps.w.org/meta-box/assets/icon-128x128.png?rev=1100915)
 * [Meta Box](https://wordpress.org/plugins/meta-box/)
 * [Support Threads](https://wordpress.org/support/plugin/meta-box/)
 * [Active Topics](https://wordpress.org/support/plugin/meta-box/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/meta-box/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/meta-box/reviews/)

 * 1 reply
 * 2 participants
 * Last reply from: [Anh Tran](https://wordpress.org/support/users/rilwis/)
 * Last activity: [10 years, 7 months ago](https://wordpress.org/support/topic/checkbox-list-problem/#post-6666711)
 * Status: not resolved