Display metaboxes if checkbox ir marked
Why don’t you use only one metabox and then use jQuery to manage what options to show: // add metabox function adding_custom_meta_boxes( $post_type, $post ) { add_meta_box( ‘my-meta-box’, __( ‘My Meta Box’ ), ‘render_my_meta_box’, ‘post’, ‘normal’, ‘default’ ); } add_action( ‘add_meta_boxes’, ‘adding_custom_meta_boxes’, 10, 2 ); // render metabox function render_my_meta_box( $post ) { wp_nonce_field( ‘my_metas_nonce’, … Read more