Skip to:
Content
Pages
Categories
Search
Top
Bottom

New Tab on Profile Page not showing all the other tabs with clicked


  • Tim2376
    Participant

    @tim2376

    Hi Guys,

    I am running into a little problem with adding a new tab to the profile page. My new page does not inherit any of the navigational menu for profile page or the user image.

    Here is what I have added to functions.php of the theme I am using:

    /*Add BuddyPress Menu tab*/
    function my_setup_nav() {
          global $bp;
    
          bp_core_new_nav_item( array( 
                'name' => __( 'My Favorite Books', 'buddypress' ), 
                'slug' => 'MyFavoriteBooks', 
                'position' => 11,
                'screen_function' => 'Favorite_Books_template'
          ) );
    }
    add_action( 'bp_setup_nav', 'my_setup_nav' );
    function Favorite_Books_template() {
        bp_core_load_template( 'FavoriteBooksTemp' );
    } 

    I have created FavoriteBooksTemp.php and added it to the root folder of the theme I am using.

    Although this works, when I click on the new tab, the page that comes up does not inherit the user image and other tabs.

    Here is a demo to show you what I mean…

    Here is the link to an example profile on my site: http://oldreading.org/members/test1234/

    When you click on “My Favorite Books”, you see the “This works!” message so I know that it is loading FavoriteBooksTemp.php correctly.

    However, as you can see from that page…
    http://oldreading.org/members/test1234/MyFavoriteBooks/
    it does not retain the user image, and menu like main profile page does.

    If anyone could help me figure out how to fix this, I would greatly appreciate it. I have searched a lot online, but can’t figure out how to eliminate this problem.

    Is there any way to get the new tab to include the profile menu if I am putting the code in functions.php of my theme?

  • The topic ‘New Tab on Profile Page not showing all the other tabs with clicked’ is closed to new replies.
Skip to toolbar