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?
- Editing stylehseet url in head section of WordPress
- separating column the variations from the add to cart button woocommerce
- How can we upload custom page files?
- Why WordPress architecture is not pure object oriented and it don’t use MVC pattern? [closed]
- To echo or not to echo?
- Blank space at beginning of tag?
- Different background-image by category
- Style every second widget?
- How do I add HTML to a PHP function [closed]
- admin-ajax.php responding with 0
- Custom image upload
- How to scale image with equal width and height without distortion?
- How to display recent posts on home page with custom HTML
- Making Quote Plugin more efficient
- How to access function from outside of a class within this class in WP plugin?
- WordPress automatically adds tags when pasting code, how to stop it?
- Add HTML Attributes To Anchor Tags In `wp_list_categories()` Function
- Hiding WordPress Plugin Source Code
- Add a Different CSS Class Into The Body Tag of Different WP Pages
- How can i display post loop in table format?
- php syntax – how to concatenate properly – echo bloginfo(‘stylesheet_directory)
- Page Reloads Before AJAX Request Finishes
- Placing raw HTML inside a WordPress shortcode
- How to only show page id as body class?
- action hook wp_head higher priority as all other plugins/hooks
- wp nav menu: add attributes to menu items [duplicate]
- WordPress override bloginfo variable