Skip to:
Content
Pages
Categories
Search
Top
Bottom

How do I replace bp_core_new_subnav() with a customized version?

  • I want to add a Member Directory tab that links to ‘/members/’ on the subnav of the friends tab.

    I added a call to bp_core_new_subnav_item() in a customized bp_friends_setup_nav(), which does add the subnav item, but, the link URL is wrong because bp_core_new_subnav_item() requires a parent url, parent slug, and screen_function.

    I tried replacing bp_core_new_subnav() with a modified version in my bp-custom.php script that doesn’t require the unnecessary fields for my special subnav item, but I couldn’t make that work. I tried `remove_action( ‘bp_setup_nav’, ‘bp_core_setup_nav’ )` and
    `add_action( ‘bp_setup_nav’, ‘cc_core_setup_nav’ )`. I would greatly appreciate some guidance.

Viewing 1 replies (of 1 total)

  • r-a-y
    Keymaster

    @r-a-y

    bp-custom.php might be too early to try the remove_action.

    Try adding the snippet in your theme’s functions.php file.

Viewing 1 replies (of 1 total)
  • The topic ‘How do I replace bp_core_new_subnav() with a customized version?’ is closed to new replies.
Skip to toolbar