Your form is sending data using POST
method, so you should receive selected value of radio button in $_POST['colorSelect']
.
To simply display it you can use:
if(isset($_POST['colorSelect']))
echo $_POST['colorSelect'];
else echo "Nothing selected";
To save it to options table use following code at the start of your function colorSelector()
:
if(isset($_POST['colorSelect']))
update_option('colorSelect', $_POST['colorSelect']);
So you can always retrieve it later using get_option('colorSelect');
I hope this will help.
It is advised for best practice that you should follow WordPress Setting API, if you have more options to save.
Related Posts:
- Drop down question
- WordPress Shortcode and Dynamic CSS
- Multiple pages on one with different HTML
- How to use a frontend URL with a Plugin
- Minify HTML, CSS, JS with PHPWee?
- Shortcode content output but not in correct place
- An unwanted inline style is added to my body tag
- Show post in slider
- How can I hide Home in my menu in a specific page?
- Missing sidebar parameter “fix” – before_content
- How Display Posts on category
- Plugin CSS not enqueing
- how to remove metadata from the posts of my blog?
- Customize position of social icons in upme plugin [closed]
- Different post styles depending on category
- How create a Shortcode with hover and complex options
- WordPress Multiple Navigation bars
- Auto 301 to full post permalink? (using : /archive/%post_id% to %post_name% )
- How do I add a custom css to all posts without affecting homepage css? [closed]
- Wrapping a Sidebar within
- Add Codepen animation as Preloader to WordPress
- wordpress admin plugin menu custom css
- How to Change CSS Colors from Custom Plugin Settings Page
- How to Schedule Cronjobs for start of every month and year
- Where can I find the inline-css of my theme header?
- Menu Custom Data Attributes
- Highlight the links without using dropdown
- Website completely messes up when logging out
- Need help removing […] after excerpt
- Link to page with posts of specific type
- Displaying images outside the content
- how to changes mobile menu toggle breakpoint in WordPress
- Background image no longer fits to screen now that project is in php files
- How to Remove Theme Style CSS inside Custom Plugin?
- Add other class content with reference class value
- PHP function for horizontal Woocommerce thumbnails and badges
- I can’t go to the page archive-{post_type}.php
- dynamic php menu with hidden sub-categories only showing when the category name is clicked
- Help me I cannot link my font-awesome to my WordPress Theme. I have my font-awesome folder already in my project
- WP Website is shown in HTML
- How do I disable cache for a certain page?
- Can’t display anything through homepage text editor
- How to find and delete a menu item in php?
- WordPress Slider is not working
- Problem with my Login Plugin
- How to return html as a string from php for WordPress
- register dependency css and js inside a plugin class
- How to display post meta bellow every posts
- how to add functions to my function.php using a child theme?
- Make a full-width wordpress page
- Target a specific container to style on WordPress storefront theme
- How to include different html tags in the header for different pages?
- user update profile for custom code
- Font-Family does not looks like how it should be [closed]
- Where to find the html for WordPress site? [closed]
- widget: input the px value from user and use it as inline style in widget function
- Show contact 7 form in popup
- WordPress – Image href for home menu nav not working
- How Can I Center the Logo in the Navigation Menu? [closed]
- featured post as div background
- Trying to customize wordpress drop down categories
- Cant get theme to change footer color through theme customizer
- How to customize posts in WordPress by using HTML and CSS?
- WP_Query not returning results
- Header location [closed]
- How do I link the side images?
- Parse error: syntax error, unexpected ‘}’ in
- Sorting Problem
- How to create a container in php then customise it in CSS
- Custom HTML/CSS Theme into WordPress – SEO considerations
- ‘This Field is Required.’ is Not Displaying on CF7 [closed]
- How to create a “Most Popular” & “Latest” TAB in WordPress
- How to create different templates for woocommerce single-product.php?
- Why do templates contain so many PHP tag pairs?
- Second select list values are not saved after clicking update
- Use wc_enqueue_js only on specific pages – nested add_action
- Page Reloads Before AJAX Request Finishes
- How to only show page id as body class?
- Add htaccess rules with insert_with_markers at beginning of htaccess
- Add a custom stylesheet for BlackBerry
- WordPress ajax doesn’t display object method on jQuery .change() function
- Styling the second sidebar
- How to add drag and drop functionalities to a div inside option panel
- Usage of call back function of add_meta_box()
- PHP contact form not redirecting [closed]
- Extend Menu Walker Output
- calling admin-ajax.php from admin-ajax.php
- Shortcode displaying at the top of the page [duplicate]
- Shortcode in Shortcode/HTML Graphics and Pictures
- How to make only the valid active page of a multilevel menu active with – “.nav li.current-menu-item a”?
- Submit remote form to wordpress REST API and save data to custom post type
- Foreach Loop Of Post Types With Nested If Else If Not Completing Process
- I cannot find the wordpress.scss file that my live site is pulling from
- HTML Formatting “single_term_title()”?
- Add .php to end of all WordPress Pages (multisite)
- Getting Member Data From WhishList Member on Register
- Create and update Custom Cookie based on multiple GET and POST Values for first time visitors?
- Can’t remove menu items added by plugin
- hello can you advise how to fix the error?
- How to create A – Z List with pictures?