Group Mods

  • Profile picture of @mercime
  • Profile picture of r-a-y
  • Profile picture of Hugo

Support: Creating & Extending

Existing and new plugins/components and themes.

Echo Group Name? (4 posts)

Started 10 months, 2 weeks ago by: thecorkboard

  • Profile picture of thecorkboard thecorkboard said 10 months, 2 weeks ago:

    Hey there-
    I need to put the group name on the group’s home page outside of the group-header.php file and into the groups/home.php file in a custom title div.

    Anytime I try ” I get nothing.

    Ideas?

    Thanks,
    ~Kyle~

  • Profile picture of thecorkboard thecorkboard said 10 months, 2 weeks ago:

    is what I tried to post there…

  • Profile picture of thecorkboard thecorkboard said 10 months, 2 weeks ago:

    bp_group_name()

  • Profile picture of Puck6633 Puck6633 said 10 months, 2 weeks ago:

    Make sure that you’ve called bp_has_groups() and bp_the_group(), otherwise all related template tags won’t do anything. See the BuddyPress Codex page on The Groups Loop for more.

    If you want to grab the name of a single group by ID try this:

    $group = new BP_Groups_Group($myGroupID, true);
    echo $group->name;