Skip to:

Re: how do you add wordpress widgets to user profiles in bp

Burt Adsit


gpo1, nope. I’ve got too much on my plate right now. I’m not going to be able to do much else except get a site launched by the 1/1/09 deadline.

I talked to Andy about enabling bp to use standard wp widgets in the member theme. Got a couple of ideas but no time at the moment to play with them. The problem is that mu deals with *one* theme per blog. The members theme is sort of this invisible theme that lurks in the background. mu doesn’t even know about it. Only bp knows about it. It *is* bp.

The way I understand that widgets work is:

Register a ‘sidebar’ in mu with a name. 1,2,3 or ‘BP Member Profile’, ‘BP Member Blogs’. The sidebar gets registered to a specific blog id.

register_sidebar(array('name'=>'Main Sidebar',
'before_title' => "<h3 class='widgettitle'>",
'after_title' => "</h3>n",

In theme code call mu’s sidebar launcher fn.

<?php if (!function_exists('dynamic_sidebar') || !dynamic_sidebar('Main Sidebar') ) : // begin primary sidebar widgets ?>

I just had some questions that I didn’t have time to investigate. When can I call call register_sidebar()? Any time I want, anywhere I want? I see it done in theme functions.php.

When I access any bp member theme functions do they execute in the blog id 1 environment? I think so.

If I register some bp member theme sidebars in bp code will it show up in the mu backend? I think so.

Seems like only the site admin who owns blog id 1 will be able to add widgets to the member theme. Well that’s a *good* thing. This is a feature.

Lots of questions and unknowns right now and not much time to explore answers. Have at it! Have fun. :)

Skip to toolbar