Hello Blush – front page- on the blog layout
Hi there,
My \”on the blog\” – the layout at front page seems going wrong. It supposes to be only 3 blog posts showing up but now it has 4.
And all other pages all have 3 blog posts showing up.
How do I change the layout for the first page?
Please see the screenshot.
Attachments
This will happen when you have a sticky post. Once removed it will not do that.
Or if you really want that post to be sticky you can remove it from the homepage loop by adding this code to your functions file at the bottom.
function hyd_remove_sticky_from_main_loop( $query ) {
if( $query->is_main_query() && ! is_admin() ) {
$query->set( 'ignore_sticky_posts', true );
}
}
add_action( 'pre_get_posts', 'hyd_remove_sticky_from_main_loop' );
Awesome! Thanks Jennifer!
Please login or Register to submit your answer