Select with CPT

Select with “custom post type” posts

Select with CPT (custom post type) posts learn more query_args

array(
  'id'             => 'unique_option_511',
  'type'           => 'select',
  'title'          => 'Select Field for CPT Posts',
  'options'        => 'posts',
  'query_args'     => array(
    'post_type'    => 'movies',
    'orderby'      => 'post_date',
    'order'        => 'DESC',
  ),
  'default_option' => 'Select a post',
),

Last updated