I just wrote this quick plugin and it seems to work. Let me know if there is a better way.
<?php
/*
Plugin Name: Theme Switch if Admin
Description: Display different theme to user if logged in as admin
Author: Kyle Barber
*/
add_filter('template', 'change_theme');
add_filter('option_template', 'change_theme');
add_filter('option_stylesheet', 'change_theme');
function change_theme($theme) {
if ( current_user_can('manage_options') ) {
$theme="twentyeleven";
}
return $theme;
}
Related Posts:
- WordPress themes that are browser tested and maintained?
- .PO file is found but I don’t see translations: how to debug the problem?
- How can I allow the Editor Role to change Theme Settings?
- How to Link External jQuery/Javascript files with WordPress
- Am I allowed to license my WordPress theme under the aGPL
- No “Add New” Button. How to add new theme?
- Splitting an Evolving Site into Multiple Sites, or Maintaining as One Site?
- How to display date such “x ago”
- How to use same theme template for multiple taxonomy terms?
- Css of both themes of my child theme isn’t showing up!
- FTP Username and password wrong while installing theme
- WP Video media player not loading correct CSS after AJAX load
- How to create child theme with Tesseract theme?
- How do I change the fonts in the Twenty Thirteen theme?
- Can I obtain differents links for different installed theme?
- Will activating a different theme preserve custom settings to current theme?
- How do you install a .MO (language file) to use as part of a theme?
- Question about the way that wp_register_script works
- Specific theme for non logged in users
- Cannot find the code for “Edit This” link in posts in a specific theme
- How do you get thumbnails to show up in the admin edit post?
- How to change the contact info at the bottom of my theme [closed]
- Customize “Continue Reading” text [closed]
- How does a Child Theme works?
- WordPress not displaying themes in the wp-content/themes folder
- How to create child theme of already active and customized theme
- Console error, even if everything is working?
- Finding wordpress file in theme editor using the theme name
- Private theme update with zip archive without deactivating the theme
- How To Remove The “Delete” Theme Option In Dashboard
- How Do I Use A Custom Mobile Theme?
- How can I make a different theme be viewed for logged in users vs guests?
- Custom branding / theme specified by URL
- New custom theme option (text input) giving index error
- CSS for triggering Avada toggles using an image or clickable element [closed]
- Published site reverts without changes to theme
- What is calling this parallax-slider.less file that is missing? [closed]
- Random 404 error on WP
- Change WordPress Theme automatically for A/B test
- Theme option not saved if in wp_editor() and html decoded
- Files empty after moving with FTP
- Full page (no WP admin menus and options) admin theme options
- display comment form for specific post id
- Update wordpress theme without customization loss
- Make multiple pages and set template/content on theme activation?
- My new WordPress theme based on the TwentyEleven theme doesn’t display the front page OR the blog page
- How to add logo in Thematic
- How to create a new copy of a theme currently being used?
- Creating a job board using WordPress (for free)? [closed]
- How to transform a custom made static HTML website to a WordPress website [closed]
- Translate a site based on different themes
- Problems to disable the comments for my statics pages
- Any Good WordPress Themes Compatible With The BBPress Plugin? [closed]
- Template messed up on viewing posts
- Issue with theme mod options during domain migration
- FTP + Unable to locate WordPress content directory (wp-content)
- How to access theme fonts using custom CSS style? [closed]
- Show hyperlinks only when user is loggedin
- I don’t know how to put a placeholder [closed]
- What data does WordPress theme update pull If there is an update?
- How to hide title on ‘highlights’ – Themify feature
- WordPress setup one database with two different website?
- remove theme’s name from dashboard .. How?
- how to stop a gallery slideshow
- How can i set default pages to a word press theme? it shouldn’t be changed even if i install the theme in different host
- WordPress 2022 template, how to see the blocks added in post template on post edit?
- Two themes using a Multiple Themes plugin
- Broken theme, stylesheet is missing after uploading the right theme via FTP
- how to notify users about new theme updates?
- I cannot get an Advanced Custom Field code snippet to work – and ACF support say it should work
- WordPress margin issues
- How to find file that placed a line in my header
- Theme check warning about text domain
- WordPress thinks my custom theme is a theme in the public theme repository
- WP Customize API Checkbox change value
- Updating a theme
- Warning: call_user_func() expects parameter 1 to be a valid callback
- Phone numbers showing same color as header [closed]
- Baskerville Theme – How to use the masonry grid layout on other pages
- Background image not showing up
- How to display post meta data in secure manner
- Line break no working on theme
- QA/Staging envirnoment for wordpress sites
- Will this js code work in a page template?
- Create /archive page in WordPress Theme
- separate home page into separate pages
- Moving WordPress with Super Skeleton theme
- Fatal error: Call to undefined function get_header() and BuddyPress [closed]
- How can I allow a client to edit certain parts of a static site?
- JQuery Error in theme for .live is not a function [closed]
- How can I either move the nav bar down or create more space for the header? Theme – Ajaira
- To create a theme or use an existing one? [closed]
- Overwrite functions.php of a theme – What if the theme is updated?
- How to add/edit content Custom Content item in theme
- Is there a WordPress theme for twittstrap? [closed]
- change template with button
- How do I remove the dash (-) between my Site Title and Tagline?
- Obtaining the original unchanged Theme [closed]
- Fatal error Class-wp-hook, again, but not sure what’s triggering it
- How to remove pop up on website (css changes not visible)?