Created
June 28, 2016 14:29
-
-
Save vailjoy/89fef17776688eee965d01caa7d920fb to your computer and use it in GitHub Desktop.
Layers: Filter Excerpts to show post content
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
/** | |
* 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