Hi there,
I have moved my blog from one site to another and in the moving have changed the template. I would really like my new blog to have the same sidebars as my old one but I can't work out what to change.
Blogs in question: hazyknits.com (old one) knitwithcathair.com (new one)
Themes in question: Yoko (old one) Jenny (new one)
There may be some problems getting the code from the new site as it is a sub-theme. If necessary I can copy pieces of code here.
Thanks for your help!
Hazel
Jerson Baguio answers:
Can you check your widgets it might be on your widgets.. you can set the same copy of your widgets from old to new one.
Jerson Baguio comments:
If you need more help can you send me your ftp and login details on both site so i can it for you
Jatin Soni answers:
It could be theme specific widget that wont work with other theme. So if you are using widget wich comes with theme than you might need to copy widget code to your current theme.
I have read yesterday when updating wordpress to 3.3 new feature is keep widget while switching the theme. If you can get all widget with your earlier theme and can update your wordpress to 3.3 that might work for your case.
Francisco Javier Carazo Gil answers:
Hi,
First of all, you will need to find in your DB the widgets. They are placed in wp_options and it is usually named:
* option_name: sidebars_widgets
* option_value: something like this:
a:3:{s:19:"wp_inactive_widgets";a:18:{i:0;s:7:"pages-2";i:1;s:10:"calendar-2";i:2;s:7:"links-2";i:3;s:6:"text-2";i:4;s:5:"rss-2";i:5;s:11:"tag_cloud-2";i:6;s:10:"nav_menu-2";i:7;s:13:"googlestats-2";i:8;s:24:"bp_core_members_widget-2";i:9;s:28:"bp_core_whos_online_widget-2";i:10;s:32:"bp_core_recently_active_widget-2";i:11;s:18:"bp_groups_widget-2";i:12;s:8:"search-2";i:13;s:14:"recent-posts-2";i:14;s:17:"recent-comments-2";i:15;s:10:"archives-2";i:16;s:12:"categories-2";i:17;s:6:"meta-2";}s:9:"sidebar-1";a:5:{i:0;s:12:"categories-3";i:1;s:6:"text-4";i:2;s:6:"text-3";i:3;s:14:"recentcomments";i:4;s:28:"bp_core_whos_online_widget-3";}s:13:"array_version";i:3;}
Well continue. We log in phpMyAdmin we do the SELECT in our old blog:
SELECT *
FROM wp_options
WHERE option_name LIKE ("%widgets%");
We copy the option_value and then we go to our new blog (the DB of our new blog) and we make this query:
UPDATE wp_options
SET option_value = 'the_value_we_have_copied'
WHERE option_name = 'our_name'
Our_name is usually: "sidebars_widgets".
Remember also to have a place in sidebar.php where the call is defined:
<?php dynamic_sidebar( 'sidebar' ) ?>