related courses display error

Home Forums Legacy Support Support queries How-to & Troubleshooting related courses display error

Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
    Posts
  • #337346
    kengi1437
    Participant
    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
    #337410
    Diana
    Participant
    Can we check this on your site? If you share site URL with temporary admin credentials here in a private reply
Viewing 2 posts - 1 through 2 (of 2 total)
  • The topic ‘related courses display error’ is closed to new replies.