Created
September 12, 2016 21:52
-
-
Save thomasplevy/61dad9e5521aee293359f60f6052ae96 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/** | |
* Custom twenty sixteen excerpt to pevent "restricted content" from being displayed | |
* on courses | |
* @see https://github.com/gocodebox/lifterlms/issues/184 | |
* @param string $class classes to add | |
* @return void | |
*/ | |
function twentysixteen_excerpt( $class = 'entry-summary' ) { | |
if ( function_exists( 'is_course' ) && is_course() ) { | |
return; | |
} | |
$class = esc_attr( $class ); | |
if ( has_excerpt() || is_search() ) : ?> | |
<div class="<?php echo $class; ?>"> | |
<?php the_excerpt(); ?> | |
</div><!-- .<?php echo $class; ?> --> | |
<?php endif; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment