in register_settings
you need to pass the names of the options you use. right now it seems like you left that call the same as from wherever you copy & pasted it (not criticizing at all here). If you need two options (why?) then you need to call it twice, once for each option.
The option name is the second parameter to the function, the first can be whatever you want but it needs to be the same with the one which you will use in the settings page itself. Best practice is to use the slug of the settings page in which the settings will be changed, to ensure it is unique and make it easy to identify the context.
Related Posts:
- How can I save a multiple select array with the settings API for a plug-in options page?
- How can one utilize a variable as a callback function name for add_settings_field
- How to get bool with `get_option()` when already registered setting with type `boolean`
- Why can’t I use “%s” format value in the WordPress function checked?
- Settings API – sanitize_callback is not called and it leads to an incorrect behavior
- Why use the Settings API over a new administration menu?
- Implement toggle switch for theme options in settings API
- Set the checkbox as checked by default at options page
- Fatal Error relating to sessions.php
- Whitelisting items from custom options page
- Settings API callback function inserts html quotes from nowhere
- Uploading files using the Settings API
- Get URL Parameters from referer
- Saving plugin settings – ERROR: options page not found
- Get categories names as an array to use it in theme settings
- how to save checkbox data for custom setting?
- register_setting & add_settings_error validation issues with multiple fields
- Reading settings in the home page precisely home.php
- Cloning add_settings_field() with jQuery
- WordPress Settings API unable to save settings
- Settings API form – submit with AJAX
- Custom plugin: how do I call a PHP file if settings option is set to true?
- register_setting not save checkbox
- How to call a WP Class inside my theme
- image on homepage disappeared due to change of permalink name
- Undefined index notice when using the $args parameter in add_settings_field()
- Best Practice for PHP
- Adding “Remember Me” in custom login
- Using wp_send_json to return HTML
- WordPress URL Rewrite not working
- How to remove a metabox from menu editor page?
- Bypass .htaccess when using download_url
- wp_remote_get returns an error for valid URL
- Install will not load: PHP does not have MYSQL installed
- Constructing a custom login form using ajax
- Error when requesting password reset email – wp authentication
- How to do conditional publishing?
- New Plugin Review
- Create custom blocks for bootstrap
- Preferred Method of debugging a wordpress SQL calls?
- Taxonomy linked to pages
- Checking for new message using AJAX and PHP. Server overload?
- WordPress Scheduled Event Request Blocking
- jQuery not defined
- dynamic page in WordPress
- How to use my style.css file outside of wordpress subdomain?
- How to sort posts based on the value (number) of a post’s metadata?
- Pagination of custom mysql in wordpress
- Automatically create child pages and grandchild pages when saving a (parent) page
- WordPress wpform plugin submit and get multiple checked value from checkbox [closed]
- How to add an arrow to menu items has submenus
- Is it possible to create a wordpress database with php code?
- Trying to get a PHP variable defined in a custom post into a javascript file. Null value. Using wp_localize_script
- How to retrieve the sender email with wp_mail()?
- WordPress update_post_meta updating with empty meta_value field [closed]
- Call to undefined function mysql_connect() After upgrading PHP 7.1 to 7.3
- Non-Closing PHP Query in WordPress Loop
- Is it save to use eval for a jQuery callback method coming from the database?
- Need oop for wordpress theme? [duplicate]
- Display Youtube Time Automate from Key
- An audio player that showcase a random song from playlist every 24h [closed]
- Use value from Ajax call in PHP function
- extract serialized array to use for wp-query
- PHP Contact form
- How to use `wp_insert_post()` and `get_permalink()` functions?
- Image Attachments of an Array into Flexslider
- save metabox with new values _wp_page_template
- get_template_part function and add images
- Need advice on theme customizer and child themes
- How to make sure relative URL works when site is not on root domain?
- xmlrpc how to check for errors
- display sticky post outside loop and exclude from loop
- remove specificly the last tag in all posts
- Change image data durgin upload
- How to hide a child category and show his parent category
- PHP Warning: exif_imagetype
- How to detect and handle the time difference between server and user in WordPress?
- Posts title instead of Pages and Category titles – PHP WordPress
- How to change PHP variables with AJAX request in WordPress
- If Statement is Ignored?
- How to change this ajax function to submit to the default wordpress content area instead of the custom field ‘seller notes’?
- Remove span tags from WooCommerce Downloads page
- Split post or page content in two or more columns
- Edit woocommerce_product_archive_description using hook
- Use Post ID in functions.php
- How to create loop inside wordpress function?
- Adding PHP to an if else loop
- Creating a custom register form
- Display only upcoming events / Show all events when archive year is selected
- Website is loading with corrupted data once a while [duplicate]
- WP_Post is not from correct array
- Showing custom field contents without listing description
- Using ‘array’ method in wp_nav_menu causes it to disappear
- If I define a variable in header.php, how do I make it available to templates?
- How to add together (get the sum) a field from all author’s posts
- two body tags on all WP pages regardless of theme
- Display biography post for today’s birthday person
- Custom taxonomy with page post type – WordPress
- Alternative to php echo within code
- Why does WordPress not send the user the email to add a password?