Skip to:
Content
Pages
Categories
Search
Top
Bottom

Custom Profile Tabs Not Working


  • nibbr2015
    Participant

    @nibbr2015

    Hi, i am bashing my head against the wall. I have added a tab to the profile but when I click on it i don’t see the sample content I created, it just loads the member list. Any idea why this isn’t working?

    //add menu item for buddy press profile
    function mb_bp_profile_menu_posts() {
    
        global $bp;
    
        
        
        bp_core_new_nav_item(
            array(
                'name' => 'New Article',
                'slug' => 'new-article', 
                'position' => 11, 
    
                'screen_function' => 'viral__write_article_screen',
                'parent_url' => $bp->loggedin_user->domain . $bp->slug ."/",
                "parent_slug" => $bp->slug
            )
        );
    }
    add_action('bp_setup_nav', 'mb_bp_profile_menu_posts', 301 );
    
    function viral__write_article_screen(){
        add_action( 'bp_template_content', 'viral__write_article_screen_content' );
        add_action( 'bp_template_title', 'viral__write_article_screen_title' );
        bp_core_load_template( apply_filters( 'bp_core_template_plugin', 'members/single/plugins' ) );
    }
    
    function viral__write_article_screen_title(){
        echo "TITLE";      
    }
    
    function viral__write_article_screen_content(){
        
        echo "WORKING";
    
    }
  • The topic ‘Custom Profile Tabs Not Working’ is closed to new replies.
Skip to toolbar