Skip to content

Instantly share code, notes, and snippets.

@vailjoy
Created June 28, 2016 14:29
Show Gist options
  • Save vailjoy/89fef17776688eee965d01caa7d920fb to your computer and use it in GitHub Desktop.
Save vailjoy/89fef17776688eee965d01caa7d920fb to your computer and use it in GitHub Desktop.
Layers: Filter Excerpts to show post content
/**
* List Excerpt
*/
if( !function_exists( 'layers_excerpt_action' ) ) {
function layers_excerpt_action() {
if( '' == get_the_content() ) return;
// Return if there's nothing to show
?>
<div class="story">
<?php
/**
* Display the Excerpt
*/
the_content();
wp_link_pages( array(
'link_before' => '<span>',
'link_after' => '</span>',
'before' => '<p class="inner-post-pagination">' . __('<span>Pages:</span>', 'ocmx'),
'after' => '</p>'
));
?>
</div>
<?php
}
}
add_action( 'layers_list_post_content', 'layers_excerpt_action' );
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment