You can use the WordPress Settings API to do what you’re looking for.
You can follow this – WordPress Settings API Tutorial ( www.ottopress.com ) to setup an options page, and depending upon the options saved in database you can show different content.
Example –
<?php
// get the stored value in variable - foo
$foo = get_option('option_name');
if ( $foo == 1 ) {
echo 'check box in CHECKED';
} else {
echo 'check box in NOT CHECKED';
}
Update –
Yup there’s Options Framework plugin plugin which can be used for this purpose.
The Options Framework Plugin makes it easy to include an options panel in any WordPress theme. It was built so developers can concentrate on making the actual theme rather than spending time creating an options panel from scratch. It’s free to use in both commercial and personal projects, just like WordPress itself.
– A Quote from plugin’s description
Related Posts:
- How To Determine If A Filter Is Called In A Sidebar/Widget Context?
- Adding a widget programmatically
- Override dynamic_sidebar() in plugin?
- Flickr plugin that will display photos from multiple group pools? [closed]
- I need some direction on how to have a sidebar based on meta rather than page
- Multisite Widget/Content
- Missing argument 3 for wp_register_sidebar_widget()
- Custom random quote widget breaks when used in multiple sidebars
- Best practice for including plugin output in a template without using shortcode?
- Widget’s container?
- Widget content turns up before title
- Listing all sidebars
- Co-author plus: list of posts by authors in the sidebar
- Cannot access variables within a widget
- twitter widget loads properly in all themes except my own theme?
- Template from scratch: Sidebars not showing widget
- What method should I use for a sidebar widget that reads latest posts?
- Can’t edit Contact Us form on front page
- Show Woocommerce minicart widget in checkout page sidebar? And, how to make this update secure by overriding widget?
- How to enable edit button in the theme’s customize UI?
- How can I make my custom shortcode work in a Custom HTML Widget?
- Disable Specific Widgets on Selected Pages of a WordPress Website?
- How do I add a widget programmatically to a newly created site (WPMU) within a plugin?
- Using the media uploader in a custom plugin
- WordPress widget / plugin….fields not appearing in my widget
- Remove Widgets in Dashboard
- How can I retrieve data within my widget
- How do I register a stylesheet inside a WordPress widget?
- Detect if a plugin was included in a certain page
- How to get popular post from across a network?
- Are there plugins that interfere with the admin part of Rss widget?
- How can I reuse the WordPress search form for a custom plugin / widget?
- Passing $this->get_field_name() to javascript
- Is there plugin to show recent posts from one website in the widget area of another?
- Can I use a form in a dashboard widget?
- Ajax gives 400 error
- I wrote my plugin. How to display the result of the plugin’s function to sidebar (widget?)?
- I have no idea “How change font for elements in widget?”
- Widget for adding HTML markup to a page
- How to save additional user data as part of the registration process?
- Get post values of form created by widget in sidebar
- Adding widgets to header and footer from plugin
- Archive – same title for the first two posts
- How to remove traces from widget during uninstallation
- Which widget to use for display category post with view more? [closed]
- WordPress Widget Not Saving Data
- Calendar Plugins – Featured Widget [closed]
- In the archive widget, how do I sort in between two years?
- WordPress plugin subscribe2 not looking the same as before migration
- Wysiwyg editor errors
- How to make WordPress customizable for clients
- How to get my plug-in, wrote in php, to refresh on its own every 5 minutes?
- Conditional tag in Widget Logic for checking if top level page or if subpage
- Trying to create a table/list of my EventBrite course listings [closed]
- How to use my menu PHP code as sidebar?
- Disabling plugin but wpenqueue is not available
- Related posts widget or plugin needed
- Problem since update 3.5 [duplicate]
- Call plugin with php function
- How to disable a widget when dependent plugin is inactive?
- How can I delete a wordpress widget instance?
- Saving widget options from class method
- How do I add the same contact form to multiple wordpress sites and capture the response in one place or database?
- Add SideBar/Widgets Just Below the Post
- PHP Warning: Declaration of aec_contributor_list::form() should be compatible with WP_Widget::form($instance)
- Plugin showing error
- WordPress Widget Not Saving Instance
- How to display a widget on a page with no theme?
- Add Stack Exchange Recent Questions to a wordpress sidebar?
- Accessing widget information
- jQuery slider widget similar to cnet.com
- Why aren’t my Follow Me links working?
- Is there any plugin to show number of clicks on the link?
- Creating New Dynamic Fields for a Certificate (Number Generation, Code Referencing, and more)
- co-authors plugin – inline listing
- Widgets are not displaying in the admin panel
- Mobile Menu and Mobile Sidebar missing
- Change language in SiteOrigin Widgets
- elementor development – custom widget like an inner section widget
- Some Widgets in the Right Side Bar and the whole Footer section is not working in a WordPress Site
- Using foreach loop for `$instance` of form and update array widget iteration
- One time call to external API in widget
- Registered sidebar area is not shown from plugin.
- Custom content per post in widget
- Using slightly modified widget
- How to make wp multisite subdomain exist search
- How can I remove this sidebar from my Search Results page?
- Custom Widget not Available after Plugin Installation
- Plugin Works, but Widget Doesn’t
- Widget Script Loads at Bottom of Page
- Use of apply_filter in plugin/widget class
- conditional tags for the output of a plugin
- Widget redirecting to home page
- Plugin won’t activate, fatal error (widget class not found)
- WordPress plugin not eching popular posts
- Trying to output a “Most visited blogs” list in wordpress multisite
- How to use template field in the Event Organiser plugin widget
- Am having issues intergrating this api into my wordpress site, any help please?
- How can I add a zip code service availability checker in WordPress without Woocommerce? [closed]
- Use custom Javascript for a custom Elementor Widget [closed]