Skip to content

Commit

Permalink
Theme: Stop showing unpublished courses on lesson cards
Browse files Browse the repository at this point in the history
Fixes #2856
  • Loading branch information
adamwoodnz committed Aug 26, 2024
1 parent 27192c6 commit 124117f
Showing 1 changed file with 6 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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 );

Expand Down

0 comments on commit 124117f

Please sign in to comment.