Ah, with the thumbnail=true
it works, thank you!
The code is generated by the NHP Options Framework—here’s the relevant code (shortened):
function setup_framework_options(){
$args = array();
//Set it to dev mode to view the class settings/info in the form - default is false
$args['dev_mode'] = false;
//Choose a custom option name for your theme options, the default is the theme name in lowercase with spaces replaced by underscores
$args['opt_name'] = 'element';
//Custom page slug for options page (wp-admin/themes.php?page=***) - default is "nhp_theme_options"
$args['page_slug'] = 'nhp_theme_options';
//Custom page capability - default is set to "manage_options"
//$args['page_cap'] = 'manage_options';
//page type - "menu" (adds a top menu section) or "submenu" (adds a submenu) - default is set to "menu"
//$args['page_type'] = 'submenu';
//parent menu - default is set to "themes.php" (Appearance)
//the list of available parent menus is available here: https://codex.www.ads-software.com/Function_Reference/add_submenu_page#Parameters
//$args['page_parent'] = 'themes.php';
$sections = array();
$sections[] = array(
'icon' => NHP_OPTIONS_URL.'img/glyphicons/glyphicons_107_text_resize.png',
'title' => __('Text Fields', 'nhp-opts'),
'desc' => __('<p class="description">This is the Description. Again HTML is allowed2</p>', 'nhp-opts'),
'fields' => array(
array(
'id' => '1', //must be unique
'type' => 'text', //builtin fields include: text|textarea|editor|checkbox|multi_checkbox|radio|radio_img|button_set|select|multi_select|color|date|divide|info|upload
'title' => __('Text Option', 'nhp-opts'),
'sub_desc' => __('This is a little space under the Field Title in the Options table, additonal info is good in here.', 'nhp-opts')
),
array(
'id' => 'logo',
'type' => 'upload',
'title' => __('Logo', 'nhp-opts'),
'sub_desc' => __('No validation can be done on this field type', 'nhp-opts'),
'desc' => __('Width should be 270px.', 'nhp-opts')
)
)
);
}
add_action('init', 'setup_framework_options', 0);