If you want to show “Courses by Instructor” in place of “Related courses”. As shown in the screenshot below :
You’ll still need to translate the string “Related courses” to relabel it.
Add this code in child theme functions.php :
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 |
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; }); |
Leave A Comment?