Skip to:
Content
Pages
Categories
Search
Top
Bottom

list of all groups


  • leandrorm
    Participant

    @leandrorm

    I would like to force the action to the user ,
    I am trying to get the list of all groups but is not working groups_get_groups ($args) and BP_Groups_Group:: get ($args); they come back with 0 groups how do I get all the groups on my db so that I can add them to the group if exist with groups_accept_invite ($user_id, $group_id);

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

  • shanebp
    Moderator

    @shanebp

    What are the $args that you are using when you call groups_get_groups() ?

    What is the context of your call to groups_get_groups() ?

    Please use:

    • the code button if you post code
    • punctuation in your posts so that it is easier to read your posts thereby increasing the chances that somebody will try to help you

    Prashant Singh
    Participant

    @prashantvatsh


    leandrorm
    Participant

    @leandrorm

    i tried alredy the `$vgroups = $groups = BP_Groups_Group::get(array(
    ‘type’=>’alphabetical’,
    ‘per_page’=>999
    ));
    print_r($vgroups);`
    and

    groups_get_groups() Ive tried numerous example, with or without id with the order with the type, but just keeps coming empty
    and i tried the :
    groop loop

    were it says :

    If you want to show all groups, regardless of whether the the logged-in or displayed member belongs to them, use this:

    bp_has_groups( ‘user_id=NULL’ )

    but it comes back empty to
    I would like to know from my function.php how do I display all the groups on my site?


    shanebp
    Moderator

    @shanebp

    @leandrorm

    Again – please use the code button when posting code.

    Again – What is the context of your call to groups_get_groups() ?

    Are your groups hidden ?
    If so, try setting the show_hidden parameter to true in $args.


    leandrorm
    Participant

    @leandrorm

    i am trying to get a list of all the groups so that i can check if it exist already but i dont understand wy the groop loop comes back empty my groups are not hidden and they are public to i use them on a map with the group locator
    my question remain how do i get all the groups in my db ?
    why are calls like bp_has_groups( ‘user_id=NULL’ ) not working.


    epgb101
    Participant

    @epgb101

    Does anyone know how to create a custom menu link to a user’s group like; My Group
    (I set number of groups a user can create to 1)
    Thanks


    shanebp
    Moderator

    @shanebp

    Example: https://yoursite.com/members/me/groups/
    That url will send any logged in user to the groups screen on their profile.


    epgb101
    Participant

    @epgb101

    Thank you for that – but I was hoping for the link to open the actual group itself listed under /me/groups/
    Like how would I link to this: https://www.mydomain.net/groups/mygroup/

Viewing 8 replies - 1 through 8 (of 8 total)
  • You must be logged in to reply to this topic.
Skip to toolbar