How can I set and get the values of a multiple select with the Wordpress settings API for a theme options page?
问题 I want to use a 'multiple select field' for a field in the theme option page using settings API. I tried with the below code but unable to save all the selected values, it only saves last one selected. add_action('admin_menu', 'create_theme_options_page'); function create_theme_options_page() { add_options_page('Theme Options', 'Theme Options', 'administrator', 'inc/site-options.php', 'build_options_page'); } add_action('admin_init', 'register_and_build_fields'); function register_and_build