Last active
September 3, 2015 02:57
-
-
Save generatepress/4eae715c9bd1da203d78 to your computer and use it in GitHub Desktop.
Show the full content of your first blog post while the others show an excerpt
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
add_filter( 'generate_more_tag', 'generate_first_post_full' ); | |
function generate_first_post_full() | |
{ | |
global $wp_query; | |
$paged = (get_query_var('paged')) ? get_query_var('paged') : 1; | |
if( $wp_query->current_post == 0 && ( is_home() || is_archive() ) && 1 == $paged ) { | |
return 'true'; | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment