Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
<?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
You can’t perform that action at this time.