[Support request] Page Header – Recent Post

Home Forums Support [Support request] Page Header – Recent Post

Home Forums Support Page Header – Recent Post

Viewing 5 posts - 1 through 5 (of 5 total)
  • Author
    Posts
  • #222653
    Sofe

    Hi Tom!

    How do I pull in the most recent post to my Page Header? I want something similar to this website https://caribecampo.com/, but with the full width to show the most recent post and underneath to split into the two columns.

    Appreciate your help in advance!

    #222668
    Tom
    Lead Developer
    Lead Developer

    Hi there,

    This plugin might help: https://wordpress.org/plugins/wp-show-posts/

    Let me know 🙂

    #222670
    Roberto Enrique

    There are plugins for doing exactly that.
    You can also use hooks add-on and try something like this, you’ll have to modify it to suit your needs but it shouldn’t be too difficult.

    https://wordpress.org/support/topic/display-most-recent-posts-on-static-homepage-how

    Or better, use the new Wp show posts plugin that Tom created just for this type of stuff

    https://wordpress.org/plugins/wp-show-posts/

    #224754
    Sofe

    This is helpful!

    Is there anyway then to hide that first post underneath where the normal posts begin?

    Best,
    Sofe

    #224836
    Tom
    Lead Developer
    Lead Developer

    Not very easily – probably a better idea to exclude the post in one of the plugins above.

    If you really wanted to try, something like this might do it:

    add_action( 'pre_get_posts', 'custom_filter_posts' );
    function custom_filter_posts( $query ) {
        $query->set( 'offset', '1' );
        return $query;
    }
Viewing 5 posts - 1 through 5 (of 5 total)
  • You must be logged in to reply to this topic.