How can I get the parent component of a page?
-
I can get the current component with
bp_current_component(), which for URLS like/members/[username]/groupsreturns “groups,” and I can check whether “groups” is a root component withbp_is_root_component(), but I can’t seem to find a function to get the parent component, which in this case would be “xprofile.” The functionbp_is_profile_component()would seem to do that, since the doc says “Check whether the current page is part of the Profile component,” but since it usesbp_is_current_component()(which returns “groups” in this case), it doesn’t work as expected. How can I do something likebp_parent_component(), or at leastbp_root_component()?
- The topic ‘How can I get the parent component of a page?’ is closed to new replies.