| @@ -5,9 +5,9 @@ | ||
| 5 | 5 | * This template can be overridden by copying it to yourtheme/learnpress/loop/course/instructor.php. |
| 6 | 6 | * |
| 7 | 7 | * @author ThimPress |
| 8 | 8 | * @package Learnpress/Templates |
| 9 | - * @version 4.0.0 | |
| 9 | + * @version 4.0.1 | |
| 10 | 10 | */ |
| 11 | 11 | |
| 12 | 12 | defined( 'ABSPATH' ) || exit(); |
| 13 | 13 | |
| @@ -14,9 +14,15 @@ | ||
| 14 | 14 | $course = learn_press_get_course(); |
| 15 | 15 | if ( ! $course ) { |
| 16 | 16 | return; |
| 17 | 17 | } |
| 18 | + | |
| 19 | +$author_id = $course->get_author( 'id' ); | |
| 20 | +$instructor = learn_press_get_user( $author_id ); | |
| 21 | +if ( ! $instructor ) { | |
| 22 | + return; | |
| 23 | +} | |
| 18 | 24 | ?> |
| 19 | 25 | |
| 20 | -<span class="course-instructor"> | |
| 21 | - <?php echo wp_kses_post( $course->get_instructor_html() ); ?> | |
| 22 | -</span> | |
| 26 | +<div class="course-instructor"> | |
| 27 | + <?php echo wp_kses_post( sprintf( '<a href="%s">%s</a>', $instructor->get_url_instructor(), $instructor->get_display_name() ) ); ?> | |
| 28 | +</div> | |