WordPress Development Stack Exchange is a question and answer site for WordPress developers and administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I have a widget area in my header. How can I have that display a different widget depending on what group is shown? So if uses are in a group about say Baseball in the site Header in my theme the Widget on Baseball shows up but if the user is in a group on Golf then the header shows a widget I have for Golf? Can this be done?

share|improve this question
Is this a Buddypress question? – Aces Mar 21 '12 at 21:25
Yes. Groups in Buddypress. – Joseph Mar 21 '12 at 21:39
up vote 2 down vote accepted

You could install widget logic and add something like bp_is_groups_component() && 'your-group' == bp_current_item() in a widget's widget logic area.

The widget logic content filter feature looks like it could create something a bit more sophisticated than the above

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.