Skip to:
Content
Pages
Categories
Search
Top
Bottom

Echo Group Name?

  • Avatar of thecorkboard
    thecorkboard
    Participant

    @thecorkboard

    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~

Viewing 3 replies - 1 through 3 (of 3 total)
  • Avatar of thecorkboard
    thecorkboard
    Participant

    @thecorkboard

    is what I tried to post there…

    Avatar of thecorkboard
    thecorkboard
    Participant

    @thecorkboard

    bp_group_name()

    Avatar of Puck6633
    Puck6633
    Member

    @puck6633

    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;
    `

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

You must be logged in to reply to this topic.