The $option_group
parameter of register_setting
should match the $option_group
parameter of settings_fields
, which is typically used as part of creating a custom settings page.
When you use register settings with register_setting()
, your registered settings are added to a global variable of allowed options, where they are grouped by the $option_group
parameter. When you submit your settings page WordPress only updates the options for $_POST
fields that match options found in the list of allowed options for the current group. The current group is determined by a hidden field that’s added by the settings_fields()
function.
Related Posts:
- How to pass arguments from add_settings_field() to the callback function?
- How to pass variable to add_settings_section() callback?
- Difference between Option_Group and Option_Name in Register_Settings
- Settings API – creating reusable form elements?
- Settings API – changing add_settings_field() output?
- register_setting() vs add_option()
- Settings API – save an array of options as one setting (array_push?)
- Setting ‘autoload’ to ‘no’ with Settings API
- How to Save Different Settings Options Using Settings API and/or the Theme Optimizer
- Serialized settings in rest api
- Can’t output do_settings_sections . Can’t understand why
- Settings API – how to update multiple options manually?
- Single callback with multiple setting fields
- Settings API – how to update options manually?
- how can I detect that option value has changed?
- How to display some settings for super admin user only using Settings API
- Is there a limit to the number of options you can store in one settings field of wp_options?
- Settings API get_option best practices
- Custom theme options Radio inputs not saving
- Settings API: Change position of custom setting field
- Tab from Settings API resetting all options with INSERT INTO [closed]
- Getting settings saved two times in settings page with tab
- get_option array value defaults and best practices
- The Settings API – What is the purpose of default value in register_setting?
- settings_fields doesn’t appear to be running
- Settings API – Separating PHP and HTML
- Two settings_fields in one form
- Settings API validation callback
- How to save custom settings api fields with custom section fuction
- How to retrieve the options from this options page?
- Add description to custom plugin setting
- Settings API and ‘type’ => ‘font’
- ‘delete_option()’ only deleting the value, not the key/value pair
- How to add a Reset to Defaults button with Settings API?
- Retrieve my custom settings in the settings/ API endpoint
- Is it possible to have a global parameter page which allows to configure other plugins in the same place?
- Multiple checkbox doesn’t work in wordpress settings api
- Is there a standard technique or API for getting the site header image?
- Help to create the best plugin settings!
- How to save Checkbox-Options in Plugin Options Page
- Problem with checkbox in Settings API
- Options saved and called in wrong order
- User specific settings, limited by role
- Access saved Options / Settings
- Dynamically Update Key in Associative Array When Saving Settings
- Incorporating the Settings API in WordPress Themes – by Chip Bennet
- How to add options for Pages?
- options validator input is false?
- Best place to store company address
- Where to adjust presets for slider options “auto rotate” (3, 5, 10, 15 seconds)? [closed]
- change backend header options
- Ignore “empty” fields when saving
- “Error: Options Page Not Found” on Settings Page Submission for an OOP Plugin
- Why does WordPress use serialize rather than json_encode for the options table? [duplicate]
- Plugin options will not save in database
- How to Create a Custom WordPress Install Package?
- Where to hook register_settings for Settings API when also want to update options outside of Settings API?
- How much string content can I store in an option?
- How should I use register_setting, add_settings_section, & add_settings_field in my plugin’s options page?
- Setting the uploads directory
- Can I use a space in an option name/key?
- How to verify this checkbox is checked?
- Deploy pre-configured database
- How to add settings subpage from a plugin to a settings page created in theme?
- WordPress options page not saving
- Can’t save checkbox option
- How to set wp_editor to be email friendly?
- Two Types of settings in WP – The Doubt
- Work flow for multiple developers
- Saving plugin options page
- Move Custom Fields on General Settings Page to New Location
- Transients API conditional
- Testing for addon plugin activated
- Where have the Privacy Settings gone in WordPress 3.5?
- Is there any other place – besides a theme, a plugin, or a mu-plugin – that an option page might conceivably be used?
- Can I use register_settings and unregister_setting once the settings page has loaded?
- Custom options in plugin, register_settings not working as no options.php?
- How can I increase the font sizes used by the WordPress visual and HTML post editors?
- How to use update_option() without replacing/losing the old value?
- how create an html table with all values from a serialized array in option_value
- WordPress modify Settings > Permalinks (options-permalink.php) Add CPT Permalink Options
- WP Page Options Array
- How do I display a WP Option from an array?
- Accept code input into Options Framework
- Character \ appearing before ‘ after saving a settings page
- [Multisite]How can I update custom blog option?
- How can I clear memcached WordPress site options by hand?
- get_option() and update_option() in a transaction (for an autoincrement value)
- Multisite Equivalent of `register_setting`?
- Move website from root to sub
- Remove Edit Profile option but still have the profile viewable
- Move one option value into another option
- Adding data to options table
- Can I use add_option for a plugin categories and how?
- WordPress options text format
- Caching of SQL queries
- $wpdb->update does not update, var_dump of data is correct
- Why wp_load_alloptions() fetches all options if no options is set to autoload?
- the function do_settings_section($page) generate error “Allowed memory size of … bytes exhausted”
- What is the equivalent of get_user_option for saving options?