Tutor LMS Instructor Redirect to BuddyPress Profile
-
Hey guys, for redirecting normal post authors to buddypress profile I use this script:
* Redirect profile links to buddypress profile
*/
function buddydev_author_redirect_to_profile() {if ( is_author() && function_exists( ‘bp_core_redirect’ ) ) {
$author_id = get_queried_object_id();
bp_core_redirect( bp_core_get_user_domain( $author_id ) );
}
}
add_action( ‘template_redirect’, ‘buddydev_author_redirect_to_profile’ );
/**
* End the redirect profile links to buddypress profile
*/Can anyone suggest a similar script for redirecting Tutor LMS course authors/instructors to their buddypress profile?
Thank you so much in advance
- You must be logged in to reply to this topic.