Skip to:
Content
Pages
Categories
Search
Top
Bottom

How to only display specific groups ?


  • totorosk8
    Participant

    @totorosk8

    Hi,
    i want more control on how to display my groups.
    I have a multilingual site and on my English page for groups (displayed with masonry groups) i want to show specific group and on my German, or Italian page for groups, i want to show others groups, and not the English one.
    Is it possible to do that?

    I tried to search for a Group ID name, to hide the groups i don’t want to show, but i can’t find any ID.

    Can someone help me to do that?
    Thanks a lot.

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

  • shanebp
    Moderator

    @shanebp

    You can see the Group ID for each group by going to wp-admin > Groups and rolling over ‘Edit’ for each Group Name.
    You’ll see something like:
    /wp-admin/admin.php?page=bp-groups&gid=1&action=edit

    In that string: gid = group id


    totorosk8
    Participant

    @totorosk8

    Thanks a lot!
    i used to see post id like this before, but i don’t know why, i didn’t thought that i could try this for groups too… 🙂

    You think i can hide some groups, if i use there id?
    Do you know how i can do that?


    shanebp
    Moderator

    @shanebp

    You’ll need to write some conditionals based on knowing the current language.

    And need to customize a template overload of this file:
    bp-templates\bp-legacy\buddypress\groups\groups-loop.php

    See function bp_has_groups in bp-groups\bp-groups-template.php for info about the include / exclude group ids parameters re the group loop.


    totorosk8
    Participant

    @totorosk8

    Thanks for your answers Shanebp.
    That looks harder than i thought, and i’m note sure i will be able to do that.
    Thanks again, anyway 🙂


    shanebp
    Moderator

    @shanebp

    Start with the first step: what language is being used?
    That is probably a common task and you should be able to find info or code examples.


    totorosk8
    Participant

    @totorosk8

    I will have French, English, German and maybe more.
    That’s why i wanted to be able to hide foreign groups on a page.
    I was thinking that i would be able to hide on group by using it’s id, just with css.

Viewing 6 replies - 1 through 6 (of 6 total)
  • The topic ‘How to only display specific groups ?’ is closed to new replies.
Skip to toolbar