Skip to content

Instantly share code, notes, and snippets.

@generatepress
Last active September 3, 2015 02:57
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save generatepress/4eae715c9bd1da203d78 to your computer and use it in GitHub Desktop.
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
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