You need to edit a lot of code to do that. This is a function to get related course.
if ( ! function_exists( ‘thim_get_related_courses’ ) ) {
function thim_get_related_courses( $limit ) {
if ( ! $limit ) {
$limit = 3;
}
$course_id = get_the_ID();
$tag_ids = array();
$tags = get_the_terms( $course_id, ‘course_tag’ );
if ( $tags ) {
foreach ( $tags as $individual_tag ) {
$tag_ids[] = $individual_tag->term_id;
}
}
$args = array(
‘posts_per_page’ => $limit,
‘paged’ => 1,
‘ignore_sticky_posts’ => 1,
‘post__not_in’ => array( $course_id ),
‘post_type’ => ‘lp_course’
);
if ( $tag_ids ) {
$args[‘tax_query’] = array(
array(
‘taxonomy’ => ‘course_tag’,
‘field’ => ‘term_id’,
‘terms’ => $tag_ids
)
);
}
$related = array();
if ( $posts = new WP_Query( $args ) ) {
global $post;
while ( $posts->have_posts() ) {
$posts->the_post();
$related[] = $post;
}
}
wp_reset_query();
return $related;
}
}`
`