<?php add_option( $option, $value, $deprecated, $autoload ); ?>
http://codex.wordpress.org/Function_Reference/add_option
global $options;
?>
<form action="options.php" method="post">
<?php $settings = get_option('options');
?>
<?php settings_fields('theme_options'); ?>
<fieldset>
<legend>Counter Position:</legend>
</br>
<p>
Right <input type="radio" name="position" value="right"/>
<p>
Left <input type="radio" name="position" value="left"/>
<p>
Center <input type="radio" name="position" value="center"/>
</fieldset>
</form>
<?php
function r_set()
{
register_setting('theme_options', 'options', 'validate_options');
}
add_action('admin_init', 'r_set');
function validate_options($value)
{
global $sa_options;
$val['position'] = $value['position'];
return $val;
}
Related Posts:
- Remove/unset options field from backend Settings->General?
- Converting HTML Template to WordPress Theme
- Multiple options not staying selected after saving
- Customize position of social icons in upme plugin [closed]
- How to get the value of input hidden html from text editor to custom page template?
- How do I add a custom css to all posts without affecting homepage css? [closed]
- Add data-id attribute to child page links
- Warning: Illegal string offset on theme options page [closed]
- Hide A Class and Add Custom HTML Code Using WordPress
- Multisite – Display different header content based on which site is accessed
- HTML in PHP problem [closed]
- Add multiple HTML attributes to an Elementor button
- Multiple choice in a custom taxonomy
- Correct syntax to html php conversion
- An unwanted inline style is added to my body tag
- How to properly insert a link to a template in WordPress?
- Store and Work with huge array in WP [closed]
- Upload Image in a WordPress page using PHP
- Displaying theme options in css
- Show post in slider
- Add itemprop Schema.org Markup to li Elements in wp_nav_menu
- Creating bulk posts with Youtube videos
- Removing unneccessary p-tags (Not every p)
- Random Default Avatar Function
- How can I hide Home in my menu in a specific page?
- WordPress automatically adding html tag around PHP code
- Missing sidebar parameter “fix” – before_content
- SQL QUERY – Select a value directly from the database
- How Display Posts on category
- Hide wordpress field if data is empty in post!
- How to get the POST TITLE using the POST ID?
- Change the site tagline (or similar) based on current page
- Trouble creating conditional PHP for nav menu items with children for custom Walker
- HTML tags in bloginfo description
- Setting custom canonical urls
- Only show search results with if current date is between two dates?
- database interactions using OOP
- Customizer: Output default value in Customizer CSS
- ACF page while loop breaks footer while loop
- How to add just one specific page to widget without plugin?
- Remove one value in dismissed_wp_pointers?
- Adding Default Settings to Theme My Login plugin
- create a select input with menus created on a custom options page
- How to add values to media “whitelist_options” in wp-admin/options.php template?
- Taxonomy linked to pages
- Getting a specific post values to another div or modal
- Add a class to the anchor tag on HTML5 gallery
- Transferring working local PHP site to wordpress – with database (MySQL)
- Create another “Display Site Title and Tagline” checkbox, “Header Text Color” setting and control
- how to remove metadata from the posts of my blog?
- Load a page into a div with Ajax
- Accessing data from a non-WP database/table within a page content
- My form action url is being prepended with a directory that does not exists
- WordPress blog post url on category page
- Where in PHP do I move title and meta (date) to bottom of each blog section?
- Changing layout with wp_customise
- WP dynamic featured image – Can’t get second featured image url
- Extending the WP_Widget_Text class
- Ajax – Call to undefined function get_option()
- Using the echo command adds unwanted br tags to source
- custom fields wordpress
- Selectbox in admin panel function linking to CSS
- Why the JavaScript code is ignored from wp editor?
- Can I install/embed WordPress on a ‘single page’?
- Populate dropdown with Child Pages based on Parent Page chosen
- How to store data from multiple forms using ajax and php
- search and replace preword from author
- Embed html in php code
- How to check if a meta value has already been assigned to any user?
- How to hide products that do not have an image from a slider carousel for an ecommerce webpage?
- Customize Theme comment template to Insert VoteUp and VoteDown buttons
- filter default query to show just selected level of child pages in wordpress
- WP grandchild categories in nested ul li
- Retrieve $_POST data submitted from external URL in WordPress(NOT API)
- Use DOMDocument with ob_start breaks my HTML code
- Trying to build simple deposit code that hooks into woocommerce
- How to pick the default selected value in wordpress dropdown?
- How to change redirection route to a php page for making it only accessible by logged-in members?
- Add New User, extra fields which are required?
- Whitelisting items from custom options page
- user_profile_update_errors hook not executing
- Send an email to specific adress when button is clicked?
- Customizer: active_callback and sanitize_callback incompatibility?
- Saving and Restoring a Canvas on A Individual User Basis
- Redirect specific user role to specific site after login?
- Send multiple attachments with wp_mail in PHP
- WordPress admin pointers tour bug?
- selected option if current category is the value
- custom url rewrite for wordpress
- Extend plugin Class through functions.php
- Options API get_option() and update_option() Not Correctly Updating or Returning
- How to add a do_action on refreshing of WP customizer?
- How to remove ?wp-mce-4103-20162941
- Weird 404 URL Problem – domain name being placed at end of urls
- Why Won’t My Inputs in a form with a Get method work together?
- Setting default category base on theme activation
- parts of url disappear when using # inside href=”” [closed]
- Settings API callback function inserts html quotes from nowhere
- Input data from email form not going to JSON file
- Make a list of sites for each user in WPMU – switch_to_blog (display in SITE_ID: 1)