Hi! Loving metabox! I need to use get_posts() (or some alternative) to query posts by subfield. Let's take as an example the very same code from the documentation:
add_filter( 'rwmb_meta_boxes', 'meta_box_group_demo_register' );
function meta_box_group_demo_register( $meta_boxes ) {
$meta_boxes[] = array(
'title' => __( 'Album Tracks' ),
'fields' => array(
array(
'id' => 'standard',
// Group field
'type' => 'group',
// Clone whole group?
'clone' => true,
// Drag and drop clones to reorder them?
'sort_clone' => true,
// Sub-fields
'fields' => array(
array(
'name' => __( 'Track name', 'rwmb' ),
'id' => 'text',
'type' => 'text',
),
array(
'name' => __( 'Release Date', 'rwmb' ),
'id' => 'date',
'type' => 'date',
),
array(
'name' => __( 'Genre', 'rwmb' ),
'id' => 'genre',
'type' => 'select_advanced',
'options' => array(
'pop' => __( 'Pop', 'rwmb' ),
'rock' => __( 'Rock', 'rwmb' ),
),
),
),
),
),
);
return $meta_boxes;
}
How can I query posts by 'genre' or any other field?