Archived topic
Page Header - Recent Post
4 replies · Started by Sofe on August 30, 2016
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!
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
This is helpful!
Is there anyway then to hide that first post underneath where the normal posts begin?
Best,
Sofe
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;
}