Skip to content

Commit

Permalink
add css display none class lp-course-buttons when empty
Browse files Browse the repository at this point in the history
  • Loading branch information
tuanta88 committed Sep 14, 2024
1 parent adf16bd commit e219bfc
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 5 deletions.
4 changes: 4 additions & 0 deletions assets/src/scss/frontend/_course-sidebar.scss
Original file line number Diff line number Diff line change
Expand Up @@ -127,6 +127,10 @@
}
}

.lp-course-buttons:empty{
display: none;
}

.course-sidebar-preview {
.course-price {
text-align: center;
Expand Down
7 changes: 2 additions & 5 deletions templates/single-course/buttons.php
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,7 @@
defined( 'ABSPATH' ) || exit();
?>

<div class="lp-course-buttons">
<?php
<div class="lp-course-buttons"><?php
do_action( 'learn-press/before-course-buttons' );

/**
Expand All @@ -27,6 +26,4 @@
do_action( 'learn-press/course-buttons' );

do_action( 'learn-press/after-course-buttons' );
?>

</div>
?></div>

0 comments on commit e219bfc

Please sign in to comment.