Ask your WordPress questions! Pay money and get answers fast! Comodo Trusted Site Seal
Official PayPal Seal

Sharing Dynamic Sidebars across Multisite Blogs WordPress


In all sub-sites of my network, I need to display the same sidebar, the sidebar of my main site.
I try this :
global $blog_id;
global $current_blog;

but that doesn't work.

Could you write the nice code please ?

Answers (3)


Ryan S answers:

Unfortunately switch_to_blog() is not the solution, try this instead

Hope that helps

Sébastien | French WordpressDesigner comments:

That seems a solution. I will look at that tomorrw.
Strange that it's not possible in php, instead of of ajax.

Ryan S comments:

Okay great, yeah unfortunately we do need AJAX to handle some back-end functionality.

Sébastien | French WordpressDesigner comments:

I would pay money to webdevstudios but it's not possible... so...


Balanean Corneliu answers:

You have tryed this ?

Balanean Corneliu comments:

Seems to be a solution that code let me know if you are testing and if is working.

Sébastien | French WordpressDesigner comments:

Where is the code ?


Giri answers:

How about this?

global $switched;
dynamic_sidebar( 'sidebar-name' );