
Theme switching done right.
Author: | Jeff Starr (profile at wordpress.org) |
WordPress version required: | 4.1 |
WordPress version tested: | 5.7 |
Plugin version: | 2.7 |
Added to WordPress repository: | 23-09-2016 |
Last updated: | 25-03-2020 |
Rating, %: | 86 |
Rated by: | 50 |
Plugin URI: | https://perishablepress.com/theme-switcha/ |
Total downloads: | 90 757 |
Active installs: | 6 000+ |
![]() Click to start download |
Preview any theme privately on the front-end
Develop themes privately behind the scenes
Enable your visitors to switch themes
There are many theme-switch plugins but none of them provide the simplicity, performance, and reliability that I require for my own sites. So I wrote my own plugin using the WP API and kept the plugin as focused and solid as possible. Only essential theme-switching features have been added, along with a simple yet informative UI. This gives you a consistent, quality theme-switching experience that you can optionally share with your visitors.
Switch to an alternate theme for preview or development while visitors use the default theme
Screenshots
FAQ
ChangeLogDoes the plugin enable anyone to switch themes?
Yes, just set the “Allowed Users” option to “Everyone”, and then add any shortcode to your page. After you do that, any user will be able to switch themes even if they are not logged in to your site.
I click the links but the theme does not switch?
It could be because of a caching plugin, or if you are trying to switch themes while logged out of WP, it could be that the setting “Allowed Users” is not set to “Everyone”.
How do exclude themes from theme switching?
Open the theme’s
style.css
file and addStatus: private
orStatus: unpublished
to the file header. See section on “Excluding Themes” in the Installation Docs for more infos.Does this plugin support Multisite?
It should work fine with Multisite, but it hasn’t been officially tested yet.
I am having problems with white screens or other errors?
Two things: 1) deactivate the plugin or remove via FTP, and 2) report the issue so I can investigate and try to fix any bugs.
How is the CSS included for the front-end shortcodes?
For better performance, the styles are included inline. The styles for each shortcode are minimal, so it’s faster to include them inline via style tags rather than chewing up another HTTP request. If you are concerned for whatever reason, you can use disable the styles in the
[theme_switcha_thumbs]
shortcode, like so:[theme_switcha_thumbs style="false"]
. That way the styles won’t be included and you can add your own however desired.Do I need to activate my alternate theme?
Question: Do I need to activate my alternate theme via Appearance > Themes?
Short answer: “no”, stay away from the Appearance > Themes screen while switching themes. Long answer: whenever you activate a theme via the Appearance > Themes screen in the WP Admin Area, that theme will be the one that is publicly displayed (live). That’s why, with Theme Switcha, you don’t make any changes via the Themes screen; rather, you just visit the plugin settings and click on whichever theme you want to view privately. Complete instructions are available here and in the plugin’s readme.txt.
Theme settings not saved after theme switching disabled?
As explained in the plugin documentation, Theme Switcha should not be used with admin-related functionality like Gutenberg, Customizer, Widgets, Menus, etc. You can learn more about this here.
Widgets are not saved after theme switching is disabled?
As explained in the plugin documentation, Theme Switcha should not be used with admin-related functionality like Gutenberg, Customizer, Widgets, Menus, etc. You can learn more about this here.
When I switch themes, will it apply to all admins or just me?
Great question. Theme-switching uses cookies to work, so it is browser-specific. That basically means that only the person who switched the theme will be able to view it. There currently is no option to switch to the same theme at the same time for multiple users. It is possible, however, to share the same Passkey Link to any group of users, so they all will switch to the same theme. For more information about this, check out the section “Usage: Passkey Links”, located in the Installation Docs.
How can I let visitors choose their own theme?
You can use any of the front-end shortcodes to enable visitors to select any available theme. It’s also possible to exclude themes from switching. Visit the Installation Docs for more information (under “Usage: Display Menus” and “Excluding Themes”, respectively).
When switching themes, will visitors see the same content?
Yes, the same database/content will be displayed regardless of which theme is enabled or switched. The WP database provides the content for ALL themes.
How can I test demo content while switching themes?
Question: How can I test demo content (like posts and pages) while switching themes?
Answer: Just make sure that all of the demo content is added as “Draft” or “Pending” instead of “Published”. Then only logged-in users with proper capabilities will be able to see it.
I still don’t get it.. how do I switch themes?
Here are the steps to use the plugin: 1) Visit the plugin settings and enable the setting, “Enable Switching”. 2) Under “Available Themes”, you will see all themes that are available for switching; click one to enable it only for you (admin). Whichever theme you enable via the plugin settings will be available to you only, so you can work on the theme while regular visitors see whichever theme is activated under the Appearance menu. Note that changes made to the switched theme will be visible only by you and other admins. Changes made to content (like post content, page content, categories, tags, etc.), on the other hand, affect all themes and will be visible to your regular visitors. For more information, check out the Installation Docs.
How do I switch themes?
Theme Switcha is meant for temporarily switching themes. To actually change the current default active theme, visit the Themes page in the WordPress Admin Area.
How do I go live with changes made to my theme?
First, as explained here, Theme Switcha is for making changes to your theme template. With that in mind. If you switch to the “Awesome” theme using Theme Switcha, and then modify the theme template files, those changes will be made public once you change the default active theme to “Awesome” (via the WP Themes page).
Note: For any admin-related features like the Customizer, Widgets, Menus, and other theme-related options, any changes made to a switched theme may or may not be remembered after activating the theme as the site’s default active theme. This is why Theme Switcha is not recommended for use with admin features like Customizer, Widgets, etc. To learn more, read this Important Information.
Got a question?
Send any questions or feedback via my contact form
If you like Theme Switcha, please take a moment to give a 5-star rating. It helps to keep development and support going strong. Thank you!
2.7 (2021/02/10)
- Tests on WordPress 5.7
2.6 (2020/11/14)
- Fixes bug with dashboard widget display
- Updates plugin script to account for changes in jQuery UI
- Adds
small-text
class to settings number input- Tests on PHP 7.4 and 8.0
- Tests on WordPress 5.6
2.5 (2020/08/09)
- Fixes incorrect information in readme/docs (Thanks to Marcel Jünemann)
- Refines readme/documentation
- Tests on WordPress 5.5
2.4 (2020/03/17)
- Adds filter hook
theme_switcha_themes
to filter themes- Adds shortcode to display link to switch to any theme
- Fixes bug with dropdown menu “Choose a theme”
- Generates new default translation template
- Tests on WordPress 5.4
2.3 (2019/11/07)
- Tests on WordPress 5.3
2.2 (2019/08/20)
- Adds current theme infos to plugin settings page
- Adds link to sticky post on plugin settings page
- Revamps plugin documentation/readme.txt
- Updates some links to https
- Generates new default translation template
- Tests on WordPress 5.3 (alpha)
2.1 (2019/05/01)
- Bumps minimum PHP version to 5.6.20
- Fixes bug with theme-switch menu in Toolbar
- Updates default translation template
- Tests on WordPress 5.2
2.0 (2019/03/10)
- Adds check for admin user for settings shortcut link
- Tweaks plugin settings screen UI
- Generates new default translation template
- Tests on WordPress 5.1 and 5.2 (alpha)
1.9 (2019/02/20)
- Just a version bump for compat with WP 5.1
- Full update coming soon 🙂
1.8 (2018/11/16)
- Adds Dashboard widget (dropdown switcha)
- Adds function to get current active theme
- Adds homepage link to Plugins screen
- Updates default translation template
- Tests on WordPress 5.0 (beta)
1.7 (2018/08/20)
- Improves support for WP Multisite
- Changes
theme
query parameter totheme-switch
- Adds
rel="noopener noreferrer"
to all blank-target links- Updates GDPR blurb and donate link
- Further tests on WP 4.9 + 5.0 (alpha)
1.6 (2018/05/08)
- Tweaks settings page UI
- Adds “Theme Switcha” menu to the WP Toolbar
- Adds filter hook,
theme_switcha_styles_thumb
- Adds filter hook,
theme_switcha_styles_list
- Fixes Undefined index notice in
plugin-core.php
on line 115- Removes unused font file,
FontAwesome.otf
- Generates new translation template
- Updates plugin image files
- Tests on WordPress 5.0 (alpha)
1.5 (2017/10/28)
- Adds blurb for WP Themes In Depth! 🙂
- Adds new default translation template
- Tests on WordPress 4.9
1.4 (2017/08/01)
- Updates GPL license blurb
- Adds GPL license text file
- Tests on WordPress 4.9 (alpha)
1.3 (2017/03/26)
- Fixes not isset notice
- Adds link to plugin docs
- Adds some missing global variables
- Tweaks styles of plugin settings page
- Changes so themes are displayed only when switching is enabled
- Fixes bug when two theme lists are displayed on the same page
- Improves documentation on plugin usage
- Fixes some incorrect translation domains
- Replaces global
$wp_version
withget_bloginfo('version')
- Generates new default translation template
- Tests on WordPress version 4.8
1.2 (2016/11/18)
- Adds rate this plugin link to settings page
- Adds
»
to rate this plugin link on plugins screen- Removes default styles for abbr tag from settings page
- Cookies now sent with “HTTP Only” flag (security enhancement)
- Regenerated default translation template
- Tests on WordPress version 4.7 (beta)
1.1 (2016/09/29)
- Fixes bug: “can’t use method return value in write context”
- Tests on WordPress 4.7 (alpha)
1.0 (2016/09/22)
- Initial release