Skip to:
Content
Pages
Categories
Search
Top
Bottom

Problems adding new menu item

  • @dlt101

    Participant

    I’ve spent 2 days browsing dozens of examples for this and trying all sorts of variations (this seems to be a headache for a lot of developers). The code below successfully adds a new item in the menu on the home page, but when I click on the ‘Courses’ tab, it not only does not display what I expected, it goes to the generic membership listing. I have to be missing something.
    ————————————————–

    function wkd_add_courses_navigation () {
       bp_core_new_nav_item( array( 
    	'name' => 'Courses', 
    	'slug' => 'courses', 
    	'position' => 15, 
    	'show_for_displayed_user' => true, 
    	'screen_function' => 'wkd_display_course_info'
       ));
    }
    function wkd_display_course_info() {
       add_action( 'bp_template_title', 'wkd_course_title' );
       add_action( 'bp_template_content', 'wkd_course_listing' );
       bp_core_load_template (apply_filters( 'bp_core_template_plugin', 'members/single/plugins' ));
    }
    function wkd_course_title () {
       echo "COURSE PAGE TITLE";
    }
    function wkd_course_listing () {
       echo "This was fun";
    }
Viewing 2 replies - 1 through 2 (of 2 total)
Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Problems adding new menu item’ is closed to new replies.
Skip to toolbar