… using this code in
index.php the result is “null”
Since the code referenced is var_dump($input_examples);
that means that $input_examples
hasn’t been set or it out of scope where you are trying to use it. You will need to add …
$input_examples = get_option('price_display_options'); // maybe not the right key
… to your code before this line:
if( $input_examples['checkbox_contactprice'] == '1' ) {
I am guessing at the option name but you get the idea.
Related Posts:
- Update problem with update_option() in combination with register_setting()
- “Error: Options Page Not Found” on Settings Page Submission for an OOP Plugin
- Is get_option function cached?
- What are the advantages to the Settings API?
- Where to store plugin settings fields
- How to Use Checkbox in Custom Option Page Using The Setting API
- What’s the best method for emptying an option created with the Settings API?
- Why won’t register_setting() create a setting?
- Performance of several get_option() calls
- Extend plugin options page
- Can I use the different settings sections over different pages using the save options group?
- Correct way check nonce (security) using old Options API
- How to add settings subpage from a plugin to a settings page created in theme?
- Remove Internal Style Sheet if no Value Provided?
- WordPress setting with select – where is my mistake?
- Custom delete option button in plugin settings
- Prevent invalid or empty values from being saved to the database and retain the form field values upon error
- Category select options for plugin settings
- Settings API: Setting default option via ‘get_option’ fails
- It is possible to pass $args that sent by add_settings_field() inside another function?
- Plugin setting page – update_option problem
- How Can I Update wp_enqueue_scripts () From WordPress Option Page Radio Buttons
- add_settings_error on validating plugin options API
- Dropdown pages in Settings API
- How do I build a settings panel under the plugin
- Add_menu_page and saving settings
- Updating Style From WP Options Setting Page
- Options don’t save, validation callback not executed
- Settings API not Saving to Database or Display
- Admin Message after Plugin Option Updated
- Settings API with arrays example
- How do I add CSS options to my plugin without using inline styles?
- How come `wp_options` table does not have an index on `autoload`?
- Adding Widget form fields dynamically
- Is get_option() faster than accessing get_transient()?
- How to properly sanitize strings for update_option()
- Which to use to execute code during the saving of a plugin settings page?
- Custom plugin settings: clicking “save changes” does not display success message
- How to use the settings API to set multidimensional arrays
- How do I handle multiple Submit buttons in plugin’s option page?
- Deletion of shared options using uninstall.php
- Add Admin Menu Inside Construct or Init
- update_option is not working!
- Save user-specific options in WordPress admin
- How to store accumulate multiple option values in a single array using Options_API
- WordPress Plugin Setting’s POST
- Add a Custom Permalink option in the Permalink Admin Screen?
- plugin development: storing language specific options
- Using the Settings API, how should I add multiple values to an option?
- WordPress security issue to output data from user input from theme option form
- Plugin options not being saved or created
- What could cause my plugin’s options/settings page not to load?
- How to set “Site Address (URL)” programmatically on WP multisite?
- null callback in add_settings_section
- Using wp_parse_args to set up Plugin Default Settings
- Single sanitization callback for multiple fields
- Callback is not called in add_settings_field() when passed as part of an array, but recognises that it’s there. It’s passed Class to Class using OOP
- When to use add_settings_section vs just register_setting?
- Storing product price data in the database
- How to fix Uninitialized string offset: error on a checkbox in WP Settings API
- WP_Editor – Saving Value into Plugin Option – Stripping HTML
- How to get specific setting by settings_fields()?
- Whitelisting items from custom options page
- Parse form values before sending to options.php
- Settings API with arrays example
- Allow users to add / remove settings in plugin
- Insert/Update values to a table after blogname option etc. is updated
- wordpress how to query wp_options table
- How to create a backend for a custom theme?
- How Can I add Fields in wp-option table?
- Plugin Options Array Set to Undefined
- Checked() function on a multidimensional array
- How to save custom settings api fields with custom section fuction
- Default settings aren’t used
- Can I use register_settings and unregister_setting once the settings page has loaded?
- WordPress theme options Menu
- Make Database query only when option is updated
- how to save wp_editor html content in options table
- settings api – add_settings_section not working
- WP Page Options Array
- How do I display a WP Option from an array?
- Update plugin settings option_name for big plugin update
- What could cause a WP Option to get truncated?
- Decontruct serialized data array from wp_options
- How to save Setting pages data to the database?
- How does one update complex options?
- Settings API not saving
- Hide / show settings field based on other field’s value
- Plugins Settings page not updating
- 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
- Cannot save settings value
- From my Plugin Settings Page use check boxes to load specific css files (e.g. Bootstrap / Foundation)
- When using an options array the Settings API isn’t creating the database record
- the correct way to use options from settings page [closed]
- Error on using __FILE__ for add_menu_page() Function
- Menu_slug used for creating options page
- How to delete all the options in an option group
- WordPress Plugin default option
- move setting data from wordpress api to codestar freamwork