Skip to:
Content
Pages
Categories
Search
Top
Bottom

Forum Replies Created

Viewing 1 replies (of 1 total)

  • Gromozeka
    Participant

    @gromozeka

    Thank. I did added custom menu item. But i try load custom template when open ,y custom page on member profile. I use this code

    function bp_gf_ua_profile_nav_add()
    {
        bp_core_new_nav_item(
            array(
                'name' => __('Email preferences', 'buddypress'),
                'slug' => 'email-preferences',
                'position' => 3,
                'show_for_displayed_user' => true,
                'screen_function' => 'bp_gf_ua_profile_load_template',
                'item_css_id' => 'all-conversations'
            )
        );
    }
    
    function mb_show_posts2() {
        echo "Test Text";
    }
    
    function bp_gf_ua_profile_load_template()
    {
        add_action( 'bp_template_content', 'mb_show_posts2' );
        bp_core_load_template( apply_filters( 'bp_core_template_plugin', 'members/single/email-preferences/preferences' ));
    }
    
    add_action( 'bp_setup_nav', 'bp_gf_ua_profile_nav_add' );

    But always display memeber-loop template. What i doing wrong?

    Thanks!

Viewing 1 replies (of 1 total)
Skip to toolbar