To store Data use this Code : save the serialize values
$title="Your Title Value";
$message="Your message HTML..";
$image="http://www.domain.com/yourimage.jpg";
$notice_data = array('title' => $title,
'message' => $message,
'image' => $image
);
if(get_option('notice_data') === FALSE){
add_option('notice_data', $notice_data );
}else{
update_option('notice_data', $notice_data );
}
Now you can get the serialize values and use in your code
$notice_data = get_option('notice_data') ;
echo $notice_data['title'];
var_dump($notice_data);
Related Posts:
- Add Plugin options as subpage to Theme options page
- wp_options not returning value for logged out users?
- How to find out if option exists but is empty?
- Custom plugin settings: clicking “save changes” does not display success message
- How to fetch serialized data from wordpress options
- Get all options saved by another plugin
- Is it ok to call get_option without hooks?
- Settings API – input always updates over validation
- add action wp_head not working
- Why is the Settings API is not saving my array of options
- Default Plugin Settings Not Writing to Database
- Update Option Error: Notice: Undefined index
- How can I add an options page for my class based plugin?
- Get plugin option in another PHP file
- How to get specific setting by settings_fields()?
- php page not found for plugin options menu
- add tabs in rdp-plugin/includes/settings.php and get settings saved
- Create tabs in admin options page from custom post type loop
- Redirect to another page using contact form 7? [closed]
- Plugin Options not being output
- Gathering and logging data from a plugin: how to do it without race conditions?
- WordPress error: Options page Setting_ not found in the allowed options list
- Can I use register_settings and unregister_setting once the settings page has loaded?
- update_option_{$option} not showing old value
- How to prevent plugins from sniffing/stealing other plugins’ options?
- get_option / wp_localize_script Not Working in OOP Plug In
- Need to add/remove group of options and display them as rows
- How to get values from network settings panel?
- How to make sure settings are not lost when plugin is updated?
- How to save Setting pages data to the database?
- how to show new field if option selected?
- Problem with MEMCACHE and Redis with wp_options
- Plugin Options Page and Subpage
- How to save the option’s new values plus old value without overwrite old one
- WP options plugin setting not saving the selected checkboxes
- Echo custom admin field into a is_single()
- Protect WordPress option value
- 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?
- How to store multiple instances of the plugin’s options for various shortcodes
- Why is the WordPress update_option not working in this code?
- How to create a new database table whenever user changes options
- Create Array from data in the OPTIONS table
- Validating values using Settings API?
- Plugin options not appearing on options page using tabbed navigation
- Saving an array to get_options
- Building a simple “settings” plugin to change textstrings on the home page
- My first plugin doesn’t save the data in options
- How to access values from your own settings page in javascript?
- move setting data from wordpress api to codestar freamwork
- When to store store plugin options as a single database record?
- Fixed: Console.log twice in the edit function
- list of custom post by custom field in frontend
- Using OR Condition with facetwp facets
- How to copy the all WordPress media items to another custom plugin folder?
- Cannot run script properly with my custom plugin
- Cookie value changes back to previous value after changing
- How to implement color picker from WordPress in my boilerplate plugin?
- Using sessions or an alternative in a plugin
- custom post type plugin error [closed]
- Change plugin descriptions
- Correct way to expand custom WordPress plugin functions
- Personality quiz in wordpress using a plugin
- How can i solve php upgrade problem
- How can we get this dynamically as this folder may not be by the same name always → wp-admin
- Hide all Admin Notices and move on a separate page
- Make downloadable ebook read online without download option
- How to access a wordpress plugin page or add posts without doing it from the WordPress dashboard?
- Critical Error message of WordPress adming
- How to display the custom post related blog by category?
- Custom plugin activation error
- Clicking custom plugin admin menu redirects to “No Update Required” on live site
- WP Forms not displaying,becomming an fatal error
- How to resolve warning for `unstableOnSplit` prop on a DOM element in block editor
- Creating an array from form inputs before it is posted to the options database
- How to fix caching issue in PHP data from database
- update_option() passing empty array() but still updating
- woocommerce: Customize email with item total count
- How use wp_insert_post and add og:custom tags?
- Is there any way to sync Facebook Comments and with comments on WordPress website?
- Show Custom Post on Frontend
- How to dynamically add template in Innerblock?
- Access remote SFTP server via WordPress login?
- Fatal error “Call to undefined function is_plugin_active” each time the plugin is activated
- The Build menu theme is frozen with the wordpress theme
- Shortcode do not return the right data in post
- Add style to body based on url
- function post to trash problem
- Problem with checked box on wp car manager plugin
- How to call function in WordPress on button click?
- how to auto random increment for post view
- Custom Plugin: How to Include Install Buttons of other 3rd Party Plugins?
- Access “wp site health info” data from plugin
- Ultimate Members Default Post Layout problem
- Fatal error: require_once(): Failed opening required
- WordPress Frontend Page using Plugin
- best way to upload a large file to wordpress using wp all import
- Why do actions with class and public method don’t fire __construct()
- How to properly enqueue jQuery knob on WordPress without conflict?
- Potential issue that plugin could have when it will be installed on several sites