I managed to figure this out. It was because on the template page where I output the form I had forgotten to include the settings_fields
function, so it was not saving the setting. I added the following code below to that page and then it worked:
<?php settings_fields('prev-next-setting'); ?>
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
- 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
- “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
- display all posts in wordpress admin crashing after 999 screen option
- 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?
- Whitelisting items from custom options page
- Two Types of settings in WP – The Doubt
- Work flow for multiple developers
- i changed my wordpress address url in SETTINGS – GENRERAL – wordpress address site url. cannot login anymore
- Functions to edit wp-config.php [duplicate]
- Show the submitted values in the form when validation fails
- 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?
- Issue on Checkbox with Custom Option Page
- How can I increase the font sizes used by the WordPress visual and HTML post editors?
- 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
- [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`?
- Call require_once form admin page with checkbox
- Move website from root to sub
- How to save the option’s new values plus old value without overwrite old one
- WordPress Boilerplate Plugin doesn’t see callback functions for add_settings_field and add_settings_section
- add image in dropdown select
- WordPress options text format
- Caching of SQL queries
- Custom general settings (textarea field) don’t output HTML correctly
- Using get_option() for check box field