Save editing WordPress theme on live site

I’m preparing to make major change in layout of this blog, mostly because of poor bounce rate. When reader comes here from Google, and lands directly on some post page, there are no suggestions what he/she can read more. I do believe I have here some useful content and make bounce rate better.

So I needed to establish way how to create and edit new theme and don’t interfere with readers. Solutions could be to do it on local copy or make it short and work on live site. Since I didn’t want to do it on local copy (I’m to lazy :) ) I wanted something else.

Solution is very simple, it took less time than write this post ;-)) Install ThemeSwitcher plugin, activate it and edit for example sidebar (sidebar.php in default WP theme). Add in some place following code:

<?php if ( current_user_can('edit_themes') ) { ?>
<li>Themes:
        <?php wp_theme_switcher(); ?>
</li>
<?php }
?>

Starting from now users with privilege of editing themes (that mean administrator role) could switch to other themes. Install now new theme You want to tweak and switch to it. You can edit files on server and test results, when all other users get old (but not broken by development efforts) theme.

Leave a comment

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.