Skip to:
Content
Pages
Categories
Search
Top
Bottom

How can I get the parent component of a page?


  • jreeve
    Participant

    @jreeve

    I can get the current component with bp_current_component(), which for URLS like /members/[username]/groups returns “groups,” and I can check whether “groups” is a root component with bp_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 function bp_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 uses bp_is_current_component() (which returns “groups” in this case), it doesn’t work as expected. How can I do something like bp_parent_component(), or at least bp_root_component()?

Viewing 4 replies - 1 through 4 (of 4 total)
Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘How can I get the parent component of a page?’ is closed to new replies.
Skip to toolbar