Skip to:
Content
Pages
Categories
Search
Top
Bottom

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


Burt Adsit
Participant

@burtadsit

I played with the widgets in the member theme for a couple of hours. I couldn’t get it to work. The problem seems to stem from the fact that the member theme code can’t register a sidebar or then call it again.

I tried registering a sidebar in my theme. Shows up fine. I can add widgets all day long. However when you call dynamic_sidebar(), dynamic_sidebar doesn’t think there are any sidebars to give to the call. The var $wp_registered_sidebars is empty and it just returns.

I didn’t have a chance to track down $wp_registered_sidebars and find out why it’s confused. The sidebars are associated with a particular blog id. So I tried just using switch_to_blog(1) before dynamic_sidebar() and that didn’t work. Evidently that isn’t enough to populate the $wp_registered_sidebars var during the call.

Skip to toolbar