141 posts Get in the spotlight
  • Author had a File in an Envato Bundle
  • Bought between 1 and 9 items
  • Elite Author
  • Exclusive Author
  • Halloween Competition Winner
  • Has been a member for 4-5 years
  • Most Wanted Bounty Winner
  • Sold between 250 000 and 1 000 000 dollars
+1 more
FamousThemes says

Hi,

I have looked around for a solution to keep widgets on a wordpress theme when switching to another theme.

Did someone found any solution to do that? Other than manually database backup, witch seems to be the only solution found by now.

Widgets are great to use in WP themes, are almost 100% necessary this days. But the fact that you will loose all the widgets setup on a theme when switching to another is disappointing :(

Thanks.

2024 posts
  • Elite Author
  • Author had a Free File of the Month
  • Has been a member for 5-6 years
  • Austria
  • Exclusive Author
  • Interviewed on the Envato Notes blog
  • Envato Studio (Microlancer) Beta Tester
+3 more
revaxarts says

I guess this should come with WP 3 .3

3256 posts
  • Elite Author
  • Sold between 250 000 and 1 000 000 dollars
  • Exclusive Author
  • Interviewed on the Envato Notes blog
  • Beta Tester
  • Author had a File in an Envato Bundle
  • Author had a Free File of the Month
+4 more
ParkerAndKent says

In any case, by switching themes, you would lose all the custom widgets packed with the theme you’re deactivating.

This can only work with standard widgets or with the ones added by external plugins.

Parker

141 posts Get in the spotlight
  • Author had a File in an Envato Bundle
  • Bought between 1 and 9 items
  • Elite Author
  • Exclusive Author
  • Halloween Competition Winner
  • Has been a member for 4-5 years
  • Most Wanted Bounty Winner
  • Sold between 250 000 and 1 000 000 dollars
+1 more
FamousThemes says

Thanks for the link revaxarts.

Finally WP will be updated with that :) , and I hope it will be the “Indefinitely” option available.

141 posts Get in the spotlight
  • Author had a File in an Envato Bundle
  • Bought between 1 and 9 items
  • Elite Author
  • Exclusive Author
  • Halloween Competition Winner
  • Has been a member for 4-5 years
  • Most Wanted Bounty Winner
  • Sold between 250 000 and 1 000 000 dollars
+1 more
FamousThemes says
ParkerAndKent said
In any case, by switching themes, you would lose all the custom widgets packed with the theme you’re deactivating.

This can only work with standard widgets or with the ones added by external plugins.

Parker

Are you sure about that ? Did you test the beta version?

I mean they should build a system to remember also the theme name, and his widgets stored in a database.

If you are true this will not help much because any theme will have his own widgets for sure.

Thanks.

214 posts
  • Has been a member for 5-6 years
  • Bought between 50 and 99 items
  • Referred between 1 and 9 users
  • Exclusive Author
agusmu says

it depends on how do you register your sidebar using register_sidebar function.

reference: http://codex.wordpress.org/Function_Reference/register_sidebar

When registering a sidebar, you can use unique sidebar ID (must be all in lowercase, with no spaces), for example:

register_sidebar(array(
  'name' => 'RightSideBar',
  'id' => 'right-sidebar',
  'description' => 'Widgets in this area will be shown on the right-hand side.'
));

when you switch your theme, if your new theme has same sidebar ID with your old theme, then your widgets for this sidebar ID will stay there… but, for different sidebar IDs, the old widgets will be moved to “Inactive Widgets” area. That’s the rule…

If you doesn’t add unique sidebar ID when registering your sidebar, then the ID for this sidebar will be “sidebar-1”, “sidebar-2”, “sidebar-3”...

3256 posts
  • Elite Author
  • Sold between 250 000 and 1 000 000 dollars
  • Exclusive Author
  • Interviewed on the Envato Notes blog
  • Beta Tester
  • Author had a File in an Envato Bundle
  • Author had a Free File of the Month
+4 more
ParkerAndKent says
FamousThemes said
ParkerAndKent said
In any case, by switching themes, you would lose all the custom widgets packed with the theme you’re deactivating.

This can only work with standard widgets or with the ones added by external plugins.

Parker

Are you sure about that ? Did you test the beta version?

I mean they should build a system to remember also the theme name, and his widgets stored in a database.

If you are true this will not help much because any theme will have his own widgets for sure.

Thanks.

Sure I’m sure… the code for custom widgets is within the theme, so if the theme isn’t installed how would you have those widgets able to be executed?

These new features of WP3 .3 can only take in consideration the basic WP features, not premium ones.

141 posts Get in the spotlight
  • Author had a File in an Envato Bundle
  • Bought between 1 and 9 items
  • Elite Author
  • Exclusive Author
  • Halloween Competition Winner
  • Has been a member for 4-5 years
  • Most Wanted Bounty Winner
  • Sold between 250 000 and 1 000 000 dollars
+1 more
FamousThemes says
ParkerAndKent said
FamousThemes said
ParkerAndKent said
In any case, by switching themes, you would lose all the custom widgets packed with the theme you’re deactivating.

This can only work with standard widgets or with the ones added by external plugins.

Parker

Are you sure about that ? Did you test the beta version?

I mean they should build a system to remember also the theme name, and his widgets stored in a database.

If you are true this will not help much because any theme will have his own widgets for sure.

Thanks.

Sure I’m sure… the code for custom widgets is within the theme, so if the theme isn’t installed how would you have those widgets able to be executed?

These new features of WP3 .3 can only take in consideration the basic WP features, not premium ones.

Thanks PK for the explanation.

This ruins all my plans with the theme I just wanted to release :) I didn’t think that detail from the beginning with loosing a theme widgets when activating another.

I must think for a new strategy.

Cheers.

3256 posts
  • Elite Author
  • Sold between 250 000 and 1 000 000 dollars
  • Exclusive Author
  • Interviewed on the Envato Notes blog
  • Beta Tester
  • Author had a File in an Envato Bundle
  • Author had a Free File of the Month
+4 more
ParkerAndKent says
FamousThemes said
ParkerAndKent said
FamousThemes said
ParkerAndKent said
In any case, by switching themes, you would lose all the custom widgets packed with the theme you’re deactivating.

This can only work with standard widgets or with the ones added by external plugins.

Parker

Are you sure about that ? Did you test the beta version?

I mean they should build a system to remember also the theme name, and his widgets stored in a database.

If you are true this will not help much because any theme will have his own widgets for sure.

Thanks.

Sure I’m sure… the code for custom widgets is within the theme, so if the theme isn’t installed how would you have those widgets able to be executed?

These new features of WP3 .3 can only take in consideration the basic WP features, not premium ones.

Thanks PK for the explanation.

This ruins all my plans with the theme I just wanted to release :) I didn’t think that detail from the beginning with loosing a theme widgets when activating another.

I must think for a new strategy.

Cheers.

Well, you can distribute a plugin with the theme specifically for the widgets. But, also in this case, if someone installs a theme with a different set of sidebars they would be moved to the inactive widgets default sidebar. This wouldn’t be that bad, because all the widgets would maintain their settings, but in any case they’d need to be then moved to the new sidebars.

Parker

141 posts Get in the spotlight
  • Author had a File in an Envato Bundle
  • Bought between 1 and 9 items
  • Elite Author
  • Exclusive Author
  • Halloween Competition Winner
  • Has been a member for 4-5 years
  • Most Wanted Bounty Winner
  • Sold between 250 000 and 1 000 000 dollars
+1 more
FamousThemes says

Just downloaded the Wordpress 3.3 beta 4 and tested.

And things seems to be amazing.

I have the default theme installed with his custom widgets and areas. Then I deactivate it, activate a custom premium theme, setup his own widgets in his own areas.

And then activate again the old theme, and all his widgets are keeped. Also reactivating again the premium theme he got his own widgets keeped in his own areas.

PK: It seems that things are working also for premium themes, and custom widgets. You where not sure about this one :P

So my question finally have a solution :) I am so happy I will continue with the work I have done.

Cheers.

by
by
by
by
by
by