Add content into new Item menu
-
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' ) );
}
- You must be logged in to reply to this topic.