Skip to:

Hide Groups widget

  • ndayakar


    Is it possible to hide Groups widget in the blog page? BTW, I have only two pages at our buddypress installation. One is Groups page and other is Blog page. Could you someone please help me how to hide groups widget in the Blog page.

    Thank you,

Viewing 4 replies - 1 through 4 (of 4 total)

  • justbishop


    There are a few ways that I know of…

    1. *NOT RECOMMENDED* Hack the core widgets code of BP to place a conditional around the groups widget itself.

    2. Hardcode the groups widget into your sidebar, and put a conditional statement around it there.

    3. Create a new sidebar widget area in your sidebar, place the conditional statement around the widgetized area, and put the groups widget in that.



    Thank you Justbishop for the response. I am not good at coding. Could you please provide the required code to hide the widget in blog page.



    Something like this should work (or at least get you going in the right direction:

    And further reading on conditional tags:

    ETA: oops, I assumed that the “blog” page was your index. In my pastebin example, you just want to replace the text “Your index page title” with the title of the page you DO NOT want the widget showing up on. Or, I guess you could also get rid of the exclamation mark and insert the title of the page that you DO want the widget on. If you literally only have the one BP page and one blog page, either method should work.



    I’m trying to figure out how this works. Where do I find the widget code? In which file?

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘Hide Groups widget’ is closed to new replies.
Skip to toolbar