[Resolved] Most Recent Post (full) + Excerpts Below?

Home Forums Support [Resolved] Most Recent Post (full) + Excerpts Below?

Home Forums Support Most Recent Post (full) + Excerpts Below?

Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
    Posts
  • #843361
    Chris

    My previous theme on several sites has a setting where it will show the most recent blog post full article on the main site page, along with a configurable number of recent post excerpts below. I have the latest GP Premium plugin and was wondering if it is possible to configure this same setup?

    I’m essentially trying to upgrade to GeneratePress, but maintain the same look and feel initially. Thanks!

    #843833
    Tom
    Lead Developer
    Lead Developer

    Hi there,

    Have you tried the columns feature?: https://docs.generatepress.com/article/using-columns-in-the-blog/

    If you set the columns to 2 and check the “Make the first post featured” checkbox, it will be full width.

    Then you can tell the first post to display the full content by using a function like this:

    add_filter( 'generate_show_excerpt', function( $show ) {
        global $wp_query;
    
        if ( 0 == $wp_query->current_post ) {
            return false;
        }
    
        return $show;
    } );

    Let me know ๐Ÿ™‚

    #844931
    Chris

    Yes, that is exactly what I’m trying to do. Worked like a charm, thanks!

    #845011
    Tom
    Lead Developer
    Lead Developer

    You’re welcome ๐Ÿ™‚

Viewing 4 posts - 1 through 4 (of 4 total)
  • You must be logged in to reply to this topic.