1. Note the custom link where you want to redirect the user to. Assume http://customlink for this example

2. Add this code in Child theme functions.php or WPLMS customiser plugin.


  Adding custom link in student Login redirect:

 

add_filter('wplms_student_login_redirect_filters','wplms_redirect_student_to_custom');

function wplms_redirect_student_to_custom($labels){
$labels['custom'] = 'Custom Link';
return $labels;
}

add_filter('wplms_redirect_location','wplms_custom_filter_location_student');

function wplms_custom_filter_location_student($links){
$links['custom'] = 'http://customlink';
return $links;
}

   

Adding custom link in Instructor Login redirect:

  

add_filter('wplms_instructor_login_redirect_filters','wplms_redirect_student_to_custom');

function wplms_redirect_student_to_custom($labels){
$labels['custom'] = 'Custom Link';
return $labels;
}

add_filter('wplms_redirect_location','wplms_custom_filter_location_instructor');

function wplms_custom_filter_location_instructor($links){
$links['custom'] = 'http://customlink';
return $links;
}

  



Result :




3.  If it is a dynamic link like a section in user profile then generate the link, for example below code will take the user to messages section :


The second part of above code :


 

add_filter('wplms_redirect_location','wplms_custom_filter_location');

function wplms_custom_filter_location($links){
global $user;
if(function_exists('bp_core_get_user_domain'))
	$links['custom'] = bp_core_get_user_domain($user->ID).'/messages' ;
return $links;
}