I want to add custom external link to nav menu on BuddyPress user profiles. I added that code to function.php, it works but how to turn it external link like forum.site.com?

 * adds the profile user nav link
add_action( 'bp_setup_nav', 'add_calendar_2_bp_nav_item' );
function add_calendar_2_bp_nav_item() {
    global $bp;

    $args = array(
        'name' => __( 'Forum', 'buddypress' ),
        'slug' => 'forum.site.com',
        'default_subnav_slug' => 'my-study',
        'position' => 24,
        'screen_function' => 'bp_nav_tab_stuff',
        'item_css_id' => 'my-study',

    bp_core_new_nav_item( $args );

As you can see, slug is not work for external link. I tried 'href =>' element, but when i use href element code is not worked.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.