Skip to:
Content
Pages
Categories
Search
Top
Bottom

Forum Replies Created

Viewing 2 replies - 1 through 2 (of 2 total)
  • @chosker

    Participant

    hello,

    had to focus on other things for a while but I’m still having issues with this

    any ideas?

    @chosker

    Participant

    thanks for the followup. guess I was looking at the wrong activity page! (I know about the global activity page, nor do I want it anyway)
    also nvm about the accepted_args param, wrong copy-paste

    I tried what you suggested and once I made my new subnav menu item into the template overload, quickly reached a blank point where I’d have no idea how to actually make the content (I tried following the trail to how the other Activity subnav links do it but couldnt find where its done)

    but now knowing that what I want is a subnav, a further search found me this valuable post.
    with the provided code I was able to add a new subnav into the member page > activity by using the bp_core_new_subnav_item function

    feels like im getting close (and in a more convenient way), and with the provided code it seems like I should already have a dummy page but instead when I click my new subnav item I get a 404 error page 🙁

    would you know why the new page isn’t getting generated?
    this is my code atm:

    function my_test_setup_nav() {
    	global $bp;
    
    	/* Add the subnav items to the profile */
    	// name, slug, parent_url, parent slug, screen function
    	bp_core_new_subnav_item( array( 'name' => __( 'Subscriptions' ), 'slug' => 'subscriptions', 'parent_url' => $bp->displayed_user->domain . 'activity/', 'parent_slug' => 'activity', 'screen_function' => 'my_profile_page_function_to_show_screen' ) );
    
    	function my_profile_page_function_to_show_screen() {
    		//add title and content here - last is to call the members plugin.php template
    		add_action( 'bp_template_title', 'my_profile_page_function_to_show_screen_title' );
    		add_action( 'bp_template_content', 'my_profile_page_function_to_show_screen_content' );
    		bp_core_load_template( apply_filters( 'bp_core_template_plugin', 'members/single/plugins' ) );
    	}
    	function my_profile_page_function_to_show_screen_title() {
    		echo 'something';
    	}
    	function my_profile_page_function_to_show_screen_content() { 
    		echo 'weee content';
    	}
    }
    add_action( 'bp_setup_nav', 'my_test_setup_nav' );

    thanks again 🙂

Viewing 2 replies - 1 through 2 (of 2 total)
Skip to toolbar