Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
Show the most recent post fully in GP
add_filter( 'generate_show_excerpt','generate_full_recent_post' );
function generate_full_recent_post()
{
// Get Customizer settings
$generate_settings = wp_parse_args(
get_option( 'generate_settings', array() ),
generate_get_defaults()
);
global $wp_query;
$paged = ( get_query_var( 'paged' ) ) ? get_query_var( 'paged' ) : 1;
if ( $wp_query->current_post === (int) 0 && 1 == $paged )
return false;
return ( 'excerpt' == $generate_settings['post_content'] ) ? true : false;
}
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.