Skip to:
Content
Pages
Categories
Search
Top
Bottom

BuddyPress Custom Nav and Page Template

  • @patrick30

    Participant

    0 down vote favorite

    I am using buddypress for a social media site.

    I have create an xprofile field called “About”, and also added a new tab in the buddypress pages using the following code.

    function custom_setup_nav() {
      global $bp;
    
      bp_core_new_nav_item( array( 
            'name' => __( 'About', 'buddypress' ), 
            'slug' => 'about', 
            'position' => 30, 
            'screen_function' => 'about_page'
      ) );
    }
    
    add_action( 'bp_setup_nav', 'custom_setup_nav' );

    Now I have created an about page and named it about.php and uploaded it to /plugins/buddypress/bp-themes/bp-default/members/single

    And then added the following screen function

    function about_page() {
    bp_core_load_template( apply_filters( 'bp_core_template_plugin', 'members/single/about' ) );
    }

    Now when I go to about page, I always get the members page displayed there, the page where the list of members are displayed and not the custom about.php page that I have uploaded, although the url remains the same, members/username/about/

    Is there something I am missing out on ?

    Thanks.

  • The topic ‘BuddyPress Custom Nav and Page Template’ is closed to new replies.
Skip to toolbar