Have just updated the Theme Switch Plugin to the latest version .

Updated nice and easy but I noticed a slight problem which has nothing to do with the plugin but it might give you issues.

I have Buddypress integrated into this site when switching to the standard BudddyPress theme using Theme Switcher the widget disappears so you are unable to switch back.

Now I think this may also occur if the widget is placed in a sidebar area that does not exist in the theme you switch to.

Now the latest version excludes the default WordPress themes which gave me the idea how to solve this.

If you find this piece of code in widget.php

if ( $option[‘config’][‘exclude’] == ‘Enable’ ) {
    if ( $theme_name == ‘WordPress Classic’ || $theme_name == ‘WordPress Default’ || $theme_name == ‘Twenty Ten’  ) 

and add in any other theme you want to exclude for instance to exclude the standard BuddyPress Theme do this

if ( $option[‘config’][‘exclude’] == ‘Enable’ ) {
    if ( $theme_name == ‘WordPress Classic’ || $theme_name == ‘WordPress Default’ || $theme_name == ‘Twenty Ten’ || $theme_name == ‘BuddyPress Default’ ) 

Problem solved hope this helps .

Tags: ,