The parameter
Autocomplete lists all post, page, custom post type by your keywords, and then you can select which one you need.
The group parameter's appearance:
Map Instruction:
array(
'type' => 'autocomplete',
'label' => __('Autocomplete', 'KingComposer'),
'name' => 'your-parame-id',
'options' => array(
/*
'multiple' => true|false // allow to choose multipe or only 1 item
'post_type' => 'any|post|page|..etc..', // default is "any"
'category' => '__id-of-category__', // Must be numberic, default is empty
'category_name' => '__slug-of-category__', // Must be string, default is empty
'numberposts' => '__number-of-item__', // Must be numberic, default is 120
'taxonomy' => '__select_post_from_taxonomy__', // Must be string, return terms list
*/
),
// You can remove 'options' to use default settings.
'description' => '',
)
Example:
'kc_progress_bars' => array(
'name' => __('Blog post', 'KingComposer'),
'description' => __('', 'KingComposer'),
'icon' => 'kc-icon-blog',
'category' => 'Content',
'css_box' => true,
'params' => array(
array(
'type' => 'text',
'label' => __( 'Title', 'KingComposer' ),
'name' => 'title',
'description' => __( 'This is text title. Leave blank if no title is needed.', 'KingComposer' ),
'admin_label' => true,
),
array(
'type' => 'autocomplete',
'label' => __( 'Select posts', 'KingComposer' ),
'name' => 'post-ids',
'description' => __( 'Select posts to display', 'KingComposer' ),
'admin_label' => true,
)
)
)
Custom result:
array( "id:name","id2:name 2" ),
"Section 2" => array( "id3:name 3","id4:name 4" ),
);
return $custom_result;
}
?>
Having trouble with map adding? Please read more about
Add Map.