Skip to:
Content
Pages
Categories
Search
Top
Bottom

Embed Groups


  • flannelgraphs
    Participant

    @flannelgraphs

    I want to embed a list of all of the groups I’ve created on a page. I tried this shortcode: [bp-groups-list] but that didn’t work. Any tips?

    Thanks!

Viewing 9 replies - 1 through 9 (of 9 total)
  • I don’t know of a shortcode for listing out groups. However, you could use the code in buddypress/bp-templates/bp-legacy/buddypress/groups/groups-loop.php as a starter. The loop is powered by bp_has_groups() which is template loop like the WordPress posts loop. You could add a template to your child theme, like page-group-list.php and copy that groups loop into it and start tinkering. you can read more about the parameters you can pass into bp_has_groups() here: https://buddypress.trac.wordpress.org/browser/branches/2.9/src/bp-groups/bp-groups-template.php#L290

    I do want to make sure that you know there’s a group directory built by default, right?


    Venutius
    Moderator

    @venutius

    An alternative would be to use the BuddyPress Extended User Groups Widget from BuddyDev to display groups the user is admin of, then use something like Shortcode any Widget to display it in the page content. Not quite what you are looking for but simpler if you don’t feel up to coding.


    flannelgraphs
    Participant

    @flannelgraphs

    Thanks! Here’s what I want to do: I want a page that I can place text on and then list out my groups underneath that text. There should be a way to do that, right? I feel like I’m just missing it…

    We’re using BuddyPress for small groups and I want all of the available small groups to be listed on the same page underneath some explanatory text.


    Venutius
    Moderator

    @venutius

    Which way do you want to go? Coding or none-coding?


    flannelgraphs
    Participant

    @flannelgraphs

    As little coding as possible. If coding gives me the better result and I can get detailed instructions on how to do it, I’m fine with that.


    Venutius
    Moderator

    @venutius

    Actually I don’t think my way will work, it only lists out the groups that the user is a member of, not groups created by you. You could ask the plugin creator to add a feature to the BuddyPress Extended User Groups widget. http://www.buddydev.com have a support forum and generally welcome suggestions for plugin enhancements.

    I’m not even sure David’s suggestion is going to work for you, are you thinking about making this feature available for others to use?


    Venutius
    Moderator

    @venutius

    So for other group creators to have a shortcode that showcases their groups?


    Venutius
    Moderator

    @venutius

    Hold the presses! I’ve found a plugin that promises to deliver what you need!

    Shortcodes for BuddyPress

    If you install this one, it seems to have a group list shortcode where you can specify the id of the user that each group will belong to.

    For example [groups-listing user_id=1]

    I think this should in the least show all the groups you are a member of, WBCOM, the plugin author are also quite active and may add a feature for an admin= option.


    flannelgraphs
    Participant

    @flannelgraphs

    You’re amazing! Thanks, Venutius!

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