I used below code I find in forum and I had enable the show related course in backend, but its display the relate course incorrect, not the same instructor as course creator/course category , how can i fix that?
add_filter('vibe_related_courses',function($args){
unset($args['tax_query']);
global $post;
// CHECKS is CoAuthors is activated
if ( function_exists('get_coauthors')) {
$instructor_name = get_the_author_meta('user_nicename',$post->post_author);
if(isset($instructor_name))
$args['author_name'] = $instructor_name;
else
$args['author'] = $post->post_author;
}else{
//If coAuthors is not active then set to current post author
$args['author'] = $post->post_author;
}
return $args;
});
https://prnt.sc/xx93y3