Skip to:
Content
Pages
Categories
Search
Top
Bottom

Add content into new Item menu


  • ikhmal17
    Participant

    @ikhmal17

    Hi, I would like to add content based from the ‘/activity/’ url into the ‘News Feed’ new menu. How can I achieve it. Thank you..


    function news_feed_nav() {
    global $bp;

    bp_core_new_nav_item( array(
    'name' => __( 'News Feed', 'buddypress' ),
    'slug' => 'news-feed',
    'position' => 100,
    'screen_function' => 'news_feed_link',
    'show_for_displayed_user' => true,
    'default_subnav_slug' => 'news-feed',
    'item_css_id' => 'news-feed'
    ) );
    }

    add_action( 'bp_setup_nav', 'news_feed_nav', 1000 );

    function news_feed_title() {
    echo 'News Feed';
    }

    function news_feed_content() {
    echo "Add something";
    }

    function news_feed_link () {
    add_action( 'bp_template_title', 'news_feed_title' );
    add_action( 'bp_template_content', 'news_feed_content' );
    bp_core_load_template( apply_filters( 'bp_core_template_plugin', 'members/single/plugins' ) );
    }

Viewing 3 replies - 1 through 3 (of 3 total)
Viewing 3 replies - 1 through 3 (of 3 total)
  • You must be logged in to reply to this topic.
Skip to toolbar