Hello, I currently have a theme using metabox and a theme using WooCommerce. I'm trying to create a 'select_advanced' field using data from the 'product' post type of the theme using WooCommerce. Is this possible?
Below is a sample of my code, which does not currently grab data from the wp_2_
tables in the DB.
Thanks a ton!
$meta_boxes[] = array(
'id' => 'featured_products',
'title' => __('Featured Products', 'framework'),
'pages' => array('page'),
'fields' => array(
// Select Products
array(
'id' => $prefix.'select_product',
'type' => 'post',
// Post type
'post_type' => 'product',
// Field type, either 'select' or 'select_advanced' (default)
'field_type' => 'select_advanced',
'multiple' => false,
// Query arguments (optional). No settings means get all published posts
'query_args' => array(
'post_status' => 'publish',
'posts_per_page' => - 1,
),
'clone' => false,
),
)
);