[wp-hackers] Multisite and Sidebar Widgets

Mark E mark at simplercomputing.net
Thu May 26 02:42:42 UTC 2011


I can. You have to put some functions in your functions.php to intercept 
and store the state of WP during a specific point in the startup 
routines, then add some code to your sidebars to do some context 
switching to get the right sidebars to show, then revert the state of WP 
accordingly. Overall it's not complicated, just sensitive to timing 
(using an exact action hook during startup) and slightly tedious to 
implement.

Then you can do an easy mod to adminimize to make it work on Multisite 
installs (and load via mu-plugins dir) so that you can remove admin menu 
items across all sites (no cloning settings required!), that way no one 
ever gets an idea to mess with sidebars etc - which reduces support 
questions other than "Hey why can't I access the theme settings?"

We use that technique to only allow access to posts, pages, comments, 
and media. All other menus are removed.

With that, we get a consistent set of sidebars across the entire site 
that are entirely controlled by the main site blog settings - ( 
typically Blog ID 1 ), and people who create blogs can only blog - 
nothing else. Perfect for a BuddyPress community :-)

Ping me offlist and I can run it down for you.

Mark

On 05/21/2011 09:49 AM, Stephen Rider wrote:
> Share?
>
> On May 20, 2011, at 2:42 PM, Mark E wrote:
>
>> I figured out how to make it happen with about a dozen lines of code - no plugins required.
>>
>> Mark
>
> _______________________________________________
> wp-hackers mailing list
> wp-hackers at lists.automattic.com
> http://lists.automattic.com/mailman/listinfo/wp-hackers
>


More information about the wp-hackers mailing list