Home › Forums › Support › "Make first post featured" leads to uneven number of remaining posts This topic has 12 replies, 3 voices, and was last updated 4 years ago by Tom. Viewing 13 posts - 1 through 13 (of 13 total) Author Posts November 10, 2018 at 1:51 pm #724036 Florian Hello, when I make my first post big with “Make first post featured”, the remaining posts are shown in an uneven number. Wouldn’t it make more sense to fill up all the remaining space? Take a look at my front page to see an example. November 10, 2018 at 5:14 pm #724118 TomLead Developer Lead Developer Hi there, Right now, the featured post counts towards the posts per page option set in “Settings > Reading”. To make things even when using a featured image, you’ll want to increase that posts per page option by 1 π November 10, 2018 at 11:20 pm #724239 Florian Thank you! November 10, 2018 at 11:20 pm #724240 Florian Unfortunately this breaks the 2nd page where there is no featured post. November 11, 2018 at 9:00 am #724602 TomLead Developer Lead Developer Give this a shot: add_action( 'pre_get_posts', function( $query ) { if ( ! function_exists( 'generate_blog_get_defaults' ) ) { return; } $settings = wp_parse_args( get_option( 'generate_blog_settings', array() ), generate_blog_get_defaults() ); if ( ! is_admin() && $query->is_main_query() && $settings['featured_column'] && ! is_paged() ) { $query->set( 'posts_per_page', get_option( 'posts_per_page' ) + 1 ); } } ); Adding PHP: https://docs.generatepress.com/article/adding-php/ November 11, 2018 at 9:29 am #724617 Florian Thank you, it works! I left a little tip earlier today on your donate page. I’m gonna do that from time to time for your great help! November 11, 2018 at 3:41 pm #724776 TomLead Developer Lead Developer Thanks so much! Really appreciate it π January 26, 2020 at 12:30 pm #1144980 Nacho Dear Tom, The code worked great for me! To reach excellence I would like to ask you a second question about it: The first post on the 2nd page of the blog is also shown as the last post on the first page. Is there any way to make this post not repeat? Thank you very much for the support! January 26, 2020 at 4:59 pm #1145119 TomLead Developer Lead Developer Hmm, that doesn’t sound right. I suppose you could try removing this part of the code: && ! is_paged() January 27, 2020 at 11:28 am #1146055 Nacho Now it works perfect, thank you!! January 27, 2020 at 3:34 pm #1146248 TomLead Developer Lead Developer You’re welcome π April 8, 2020 at 2:30 am #1230917 Nacho Dear developers, the code has stopped working. Has there been any change in the last update that affected this? Thanks for the support! April 8, 2020 at 9:33 am #1231544 TomLead Developer Lead Developer Hi there, No, that code should still work as always. Has anything else changed on your site? Maybe try deactivating your plugins one by one to check for conflicts. Author Posts Viewing 13 posts - 1 through 13 (of 13 total) You must be logged in to reply to this topic. Log In Username: Password: Keep me signed in Log In