I would like to limit the option of being ‘followable’ to authors (members of a certain group in Buddypress happen to be WP authors), so I am using the following snippet to remove follow buttons from other users (subscribers mostly):
if ( ! user_can( bp_displayed_user_id(), 'delete_posts' ) ) remove_action( 'bp_group_members_list_item_action', 'bp_follow_add_group_member_follow_button' );
Is there a smarter way of doing this without messing with the plugin files?
- The topic ‘How to remove Follow buttons based on user capabilities’ is closed to new replies.