Add tab to activity page

function my_theme_add_activity_tab() {
if ( !is_user_logged_in() )
return false;
<li id="activity-myclass">
<a href="<?php echo site_url( BP_ACTIVITY_SLUG . '/#myclass/' ) ?>" title="<?php _e( 'Activity for my Class Year.', 'buddypress' ) ?>">
<?php printf( __( 'My Class', 'buddypress' ) ) ?>
add_action( 'bp_activity_type_tabs', 'my_theme_add_activity_tab' );


You must be logged in to post a comment.

  1. Ok , Adam , no problem , thanks for your respond , this function is not too much important to me anyway .

  2. I did a lot of hacking related to this and had troubles. I think a better route is to learn how to create a buddypress component. Its pretty complicated but worth it in the longrun. There is actually a wordpress plugin called buddypress component skeleton you can install via the wordpress plugin system.

    Good, luck. Like I said the bp component is complicated but works better than hacking the tabs.

  3. Hello,
    thanks again for another very useful code , really appreciate this site , I have added new tab (Music & Video ) below main ACTIVITY TAB , working fine with oembed You tube plugin and the videos from there , but below that new TAB are also another previous activity items (post updates , events updates etc. ) How can I do the Tab content unique for only this Music & Video and NOT for anything else ?