BuddyDev

Search

[Resolved] How do I get BuddyPress group name from id?

  • Participant
    Level: Enlightened
    Posts: 88
    Torben Heikel Vinther on #21061

    Hi

    I’m trying to customize the Events Manager plugin so that I can show the group name on the single event page if the event is a group event. I can get the gorup id but I can simply not figure how to use that group id to show the name instead.

    Is there any function that takes the group id as a parameter and then shows the group name instead?

    Probably a very simple answer but I really appreciate your help…

  • Keymaster
    (BuddyDev Team)
    Posts: 24238
    Brajesh Singh on #21062

    Hi Torben,
    Sure.

    You can use the following

    
    
    bp_get_group_name( groups_get_group( $group_id));
    

    Where $group_id is your actual group id.

    Regards
    Brajesh

  • Participant
    Level: Enlightened
    Posts: 88
    Torben Heikel Vinther on #21067

    Thank you SO much Brajesh. It works and I can get further 🙂

  • Keymaster
    (BuddyDev Team)
    Posts: 24238
    Brajesh Singh on #21068

    You are welcome.

    All the best 🙂

    Regards
    Brajesh

The topic ‘ [Resolved] How do I get BuddyPress group name from id?’ is closed to new replies.

This topic is: resolved