you are registering two separate settings groups for setting fields & the problem might be here.
function set_options() {
register_setting( 'checkbox-1-settings', 'my_checkbox_1_name' );
register_setting( 'checkbox-2-settings', 'my_checkbox_2_name' );
}
so use only one settings group for both fields to see if it works.
function set_options() {
register_setting( 'checkbox-settings', 'my_checkbox_1_name' );
register_setting( 'checkbox-settings', 'my_checkbox_2_name' );
}
Update
Get settings API and store in an array.
$options = (array) get_option( 'plugin_options' );
Now $options
is an array containing all fields sub fields. and you can get the value of any key by just passing that key with this array.
for example to get a value of check_2
$check_two = $options['check_2'];
Related Posts:
- Where can I find a schema of wordpress plugin core architecture?
- How to Loop Plugin Option Field Set?
- How to handel multiple checkbox field in the admin settings page with Settings API
- Custom plugin settings: clicking “save changes” does not display success message
- How can I include a setting that has a variable number of values in a settings page using register_setting?
- Where should my plugin POST to?
- Saving Plugin settings to the database
- Plugin development: how to create a form and get custom data?
- shortcode doesn’t work
- Add a Custom Permalink option in the Permalink Admin Screen?
- Admin page: form with enctype=”multipart/form-data” does not transfer its data
- Wp die causing 500 Internal Server Error?
- Why this global array is returning NULL from a callback function
- How to trigger $_GET request within admin plugin page?
- Custom form action to handle data inside a plugin
- wp_create_nonce function doesn’t work inside a plugin?
- New User Form – Custom Menu Page
- How to get specific setting by settings_fields()?
- Using a custom plugin to capture input data via Ajax and PHP
- Change the display of Settings API (do_settings_sections)
- Settings API saved values not getting shown in the dropdownbox
- Submit Form data to another page via Ajax (WordPress Way)
- Can I use register_settings and unregister_setting once the settings page has loaded?
- Select Form Element Not Saving from Plugin Options
- How to append new form elements in “Add New” form of Users in WordPress admin panel?
- How to make sure settings are not lost when plugin is updated?
- How to save Setting pages data to the database?
- User loggedin as Subscriber form not sending
- How to save the option’s new values plus old value without overwrite old one
- submit form data to wordpress existing database table using my plugin
- WordPress Boilerplate Plugin doesn’t see callback functions for add_settings_field and add_settings_section
- How do I add a textarea (multirow) option to my WordPress plugin?
- WP_Filesystem usage within a block of code
- Validating values using Settings API?
- Linking Plugin Files to WP
- Create plugin with form in post and submit it to specific form
- Capturing POST data
- Creating fields in the database
- Undefined variable _POST
- move setting data from wordpress api to codestar freamwork
- Display file contents within Plugin
- wordpress get meta value by meta key
- update_meta_user difference in i:1 and b:1, how to write b:1
- Registration Form Validation in wordpress
- Errors while using ajax from external wordpress page
- Dequeue / Deregister script and replace it with a new plugin
- Hide Theme options and Customize Admin menu
- How can I implement a notification system in wordpress?
- Building an email signup form. Where should the information be saved in the DB?
- Where should I save an API key of my user when installing my plugin?
- How to make a customize role and view a specific plugins base on that role?
- WP Post Template – Templates in own folder
- Map Custom Registration Fields to WordPress User Roles
- custom payment gateway in woocommerce failed to connect to remote api server
- Plugin options page with live preview?
- Ajax call returning 0
- How to update post’s content on post publish?
- Create tabs in admin options page from custom post type loop
- ob_start() combined with wp_query
- WordPress get_avatar function not correct working
- Can I use Symfony components in a plugin that I want to submit to the WordPress plugin repository?
- Custom Login Page — wp_signon Headers Already Sent?
- Add User Role: Pre-saved in User-Meta [SOLVED]
- Add_rewrite_endpoint doesn’t work with post name permalink structure
- How WordPress core manage the plugin installation
- Why is my WordPress Plugin page requesting my FTP Login Credentials?
- Cross Sells are not being shown in Cart Page. Please Help!
- Storing The Data Collected by Ninja Forms into Another (custom) Database [closed]
- adding custom code as a wordpress plugin
- Echo out element to another page.
- count the number of views of a post excluding own views
- How To Create A File Archive in WordPress?
- Custom Post Type, Custom Columns List
- get wpforms ID value from ACF text field
- i need to make custom cron_schedule with custom interval time as a parameter into a custom payment gateway plugin wordpress
- How to set Google Analytics tracking code on WordPress plugin directory page?
- How to add styles to a submenu page?
- How to store a secret for a plugin inside public_html
- Problem with checked box on wp car manager plugin
- Create a link that calls our custom function in WordPress
- Update a previous version of plugin when the new plugin is built from the scratch
- Woocommerce list variations that are added already to cart in Single Product
- Plugin json page
- Passing ajax variable to more than one wordpress plugin function
- search into subcategories plugin subcategory value not come
- Why isn’t my plugin seeing other classes?
- How Can the_post Be Hooked Like the_content and the_excerpt?
- Saving custom form fields
- How to tell which Plugin is displaying?
- Get Core Functionality from Within a (Secondary) Plugin File
- wp_insert_post_data filter to set category
- is there a way I can add or remove some plugin options?
- How to provide access to specific plugin to all the user roles except subscriber in wordpress
- Output pure JSON wordpress
- how to remove a rel=”nofollow” using call to action plugin
- Activate plugin button do nothing [closed]
- Form with response button after on table after submission
- Meta box not displaying on the plugin page
- wordpress admin-ajax bad request 400
- public custom posts not showing in my wordpress plugin