Opened 13 months ago
dynamic_sidebar does not consider switch_to_blog
|Reported by:||tarasm||Owned by:|
On the main site of my WordPress network, I have a header that I would like to show on all other sites of the network. The main site uses the parent theme and all of the other sites use child themes. In header.php of the parent theme, I'm using switch_to_blog function to load Navigation Menus from the main site in the header of the other sites. This is working perfectly.
I also have a sidebar in the header that I would like to manage on the main site as I do with the navigation menu. Unfortunately, this doesn't work at all because dynamic_sidebar function does not take into consideration switch_to_blog. I get no output instead of showing sidebar from main site.
Others with same problem
Boone Gorges did a good job of explaining this problem on WordPress Stackexchange on the question titled: Sharing Dynamic Sidebars across Multiple Blogs.