diff --git a/wp-content/themes/pub/wporg-learn-2024/src/lesson-course-info/index.php b/wp-content/themes/pub/wporg-learn-2024/src/lesson-course-info/index.php index f1d386995..833d4be37 100644 --- a/wp-content/themes/pub/wporg-learn-2024/src/lesson-course-info/index.php +++ b/wp-content/themes/pub/wporg-learn-2024/src/lesson-course-info/index.php @@ -48,6 +48,12 @@ function render( $attributes, $content, $block ) { return ''; } + $course_published = 'publish' === get_post_status( $course_id ); + + if ( ! $course_published ) { + return ''; + } + $course_title = get_the_title( $course_id ); $course_permalink = get_permalink( $course_id );