This is a fairly broad question. There are many approaches thinkable, but here is the lay-out for an easy one:
-
Build a child theme, consisting only of a
style.css
. -
Find the id of the highest level wrapper in the theme, let’s say
2016id
-
In
style.css
add style rules that depend on the class of the wrapper, like#2016id.style1 .widget h2 {color:red;}
and#2016id.style2 .widget h2 {color:yellow;}
-
Now you have to add a buttons to toggle the class like this:
<a onclick='document.getElementById("2016id").classList.add("style1").remove("style2")'> Show style 1</a>
. The simplest way to add it is to put it in a text widget that you include in your sidebar. Else you’ll have to copy a template file to your child theme folder and edit it.
Read more about adding and removing classes on elements.
Related Posts:
- Removing the custom_image_header from wp_head
- Between functions.php (theme), widgets, and plugins, which is loaded first?
- Disable plugin / plugin action via theme
- Shared functionality in plugins and themes
- Need to create a Theme demo site that features multiple themes
- Adding a text domain to every __(), _e() and __n() gettext call without a plan to create own translations
- Can we completely remove the WordPress Sitemaps (WordPress 5.5)?
- Declare a function before plugin does on the theme functions.php file
- Seeking clarification on page request life-cycle
- How do I make my wordpress page more friendly for mobile viewers?
- Check javascript file Proper way in functions.php
- Should I use RIPS tool to test my themes and plugins?
- Code in theme functions.php faster than with a plugin?
- Workflow and best practice for documentation [closed]
- Is there a quick way to inject i18n domain into theme/plugin files?
- Override the core function locate_template
- Set WordPress Featured Image For All Post Slugs Matching Image File Name in Specified Directory
- Showing Co-Authors on post page
- Translating plugin inside the theme [closed]
- Why are some of my thumbnails not being generated?
- Include Max mega menu Plugin into theme
- Override the filter from plugin in child theme
- Custom Taxonomy Tag Search
- wordpress theme backend admin only
- How to get current post user id
- Different UI in WordPress
- How to Display a Plugin function (content) on frontpage using index.php
- The problem with WordPress Importer
- Display post lists in 2nd paragraph
- Classified ad website : which solutions to use? [closed]
- Fatal error: Call to undefined function cmsms_theme_page_layout_scheme()
- All sites themes functions.php have been changed
- Finding the URL to be used to check if plugin is installed with a theme
- How can I position ShareThis buttons manually when using the plug-in? [closed]
- How to use get_template part in the plugin?
- Redirect to another page using contact form 7? [closed]
- How do I combine a theme with a plugin
- Overwrite category head title
- How to write “alt” tag in image for wordpress code?
- Proper way to use plugin functions in functions.php
- Use different single.php file based on condition
- Shortcode Attributes to Return different $_POST
- How to make a dynamic css class whose name changes every visit to confuse scraper
- Include Minit plugin in theme [closed]
- Woocommerce singe product custom gallery output works just on the first slide
- How can I use my custom wordpress theme on two websites? [closed]
- Set up functions to be overridden without using function_exists() by short-circuiting them?
- why need theme,if page builder is there in wordpress [closed]
- Inserting Plugins Into Blank Space of Externally Designed WordPress Theme
- Don’t load the theme for a page FROM a plugin EDITED
- Extending a theme: build new features as plugin or core modules?
- how to design change in woocommerce cart page and all other page also by theme? [closed]
- display unique post per category
- How do you create a re-useable HTML fragment in wordpress
- Identify current wordpress theme
- What is the most efficient way of adding additional functionaliy for admin only
- Elementor Sidebar not loading when PRO elements plugin is active
- How would I get the new plugin version on this function?
- How to override any plugin file in the child theme
- Unpublished Pages Failing To Appear On Custom Path
- Hide Plugin Custom Post Type Menu Link
- Submitting form to PHP
- Conditional Homepage for logged in user
- How to get a post views count using ‘WordPress popular posts’ plugin
- Securing langugae folder
- when i activate my WordPress plugin cannot see customizer options or preview
- Showing different js file for different theme in wordpress customizer api
- WordPress panel is not loading after plugin activated with error: HTTP ERROR 500
- When the user entered an unauthorized url redirect to login page
- How to wrap image tag into div for post only?
- How can I make the search bar in my wordpress site search all of the pages rather than just the blog posts?
- Shows warning when enable “wp_gallery_custom_links” plugin with Themify Builder
- how to add custom css at top above all css file for specific url
- How to Call Function From Separate WordPress Install on Same Server?
- Why the output of an image gallery plugin is not displayed into a page of my custom theme?
- pluggable function in theme, to be overridden by plugin
- Can anyone tell me why I can’t edit a plugin when it is installed without having to re-install?
- Disqus plugin outputs script as literal text
- Can’t get custom user meta to show in header
- Breadcrumb is not generating the correct post page url
- Site is setup statically – how to make it content managable?
- How to work email subscribe in WordPress?
- Javascript as Jquery Function Call?
- Editing a theme
- How to escape html code?
- How to create an Info Box on WordPress [closed]
- How to make content as required in custom post type?
- How to assign user a role if none is present when logging in
- Migrating a File from Plugin to Theme and changing its path → instead create a REST endpoint
- How to prevent users to download videos from lms website?
- How to change constants in WordPress wp-config.php programmatically?
- What is @Action in WordPress?
- Adding a pagenavi to function for displaying bookmarks
- How do I work with the SlideDeck plug-in?
- Disable WordPress Theme Browser and Plugin Browser
- Sold out Label for variable products which are partially sold out
- post id or permalink auto-incrementing number and reset everyday
- Get a Taxonomy values in an array
- functions.php conditional output for a single plugin
- How to disable plugin capability : “create new category”