Re: Buddypress Followers for Just Blog Stuff
`function bp_follow_add_listing_follow_button_blogs() {
global $bp, $members_template;
if ( $members_template->member->id == $bp->loggedin_user->id || !is_user_logged_in() )
return false;
if ( !$members_template->member->is_following ) { ?>
$members_template->member->user_nicename, $members_template->member->user_login ) . $bp->follow->followers->slug . ‘/start/’,
‘start_following’ ) ?>” class=”follow” id=”follow-member->id ?>”><?php printf( __( 'Follow %s' ),
bp_get_user_firstname( $members_template->member->fullname ) ) ?>
<?php
} else { ?>
$members_template->member->user_nicename, $members_template->member->user_login ) . $bp->follow->followers->slug . ‘/stop/’,
‘stop_following’ ) ?>” class=”unfollow” id=”unfollow-member->id ?>”><?php printf( __( 'Stop Following %s'
), bp_get_user_firstname( $members_template->member->fullname ) ) ?>
<?php
}
}
add_action( ‘bp_directory_blogs_actions’, ‘bp_follow_add_listing_follow_button_blogs’ );
add_action( ‘bp_followers_list_item_actions’, ‘bp_follow_add_listing_follow_button_blogs’ );
add_action( ‘bp_following_list_item_actions’, ‘bp_follow_add_listing_follow_button_blogs’ );
`
I tried this but it didn’t work now I’m trying to figure out how to fix the Following count. It stores the follow action as part of your followers count. but that’s not a problem.
How would I weave in the Member Follow button into the Blogs Directory Listing.
Beyond that, how can I take that Follow button and insert it into the sub blogs sidebar.