Reply To: [Resolved] Conditional Tag to Target Specific Buddypress Group Page
@henrywright Thanks Henry, unfortunately your function didn’t work either, however, you put me on the right track! Before speaking to you I had already sworn off bp_is_groups_component(). Interestingly enough bp_is_current_action is also needed alongside it to do what I need.
Here’s what worked:
function wp_redirectauser() {
if ( current_user_can('subscriber') && bp_is_groups_component() && bp_is_current_action( 'events' ) ) {
wp_redirect( 'http://www.mywebsite.com/sales-page/' );
exit;
}
}
add_action( 'wp', 'wp_redirectauser' );