WordPress.org

Ready to get started?Download WordPress

Forums

BP Group Hierarchy
how to get group parent id (2 posts)

  1. samouille
    Member
    Posted 1 year ago #

    Hi everybody,

    Is there any way to get de parent id from a group ?

    I tried to find a solution by myself but I found no doc or codex who explains how to use/customize this plugin.

    Tyvm

    Sam

    http://wordpress.org/extend/plugins/bp-group-hierarchy/

  2. Gabrielle
    Member
    Posted 1 year ago #

    To get the current group parent id:

    $parentid = $bp->groups->current_group->parent_id;

    Outside the loop, you can use this if you have the group id:

    $group = new BP_Groups_Hierarchy($groupid);
    $parentid = $group->parent_id;

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic

Tags

No tags yet.