Home › Forums › Support › Not showing all posts This topic has 9 replies, 2 voices, and was last updated 3 years, 8 months ago by David. Viewing 10 posts - 1 through 10 (of 10 total) Author Posts August 19, 2020 at 1:44 am #1409013 David Hello I have this website… [In SITE URL] Type password: glamping I’ve added a custom post type called glamping. I have 14 listings, but only 10 are showing up on the page. In Settings > Reading I’ve changed… Blog pages show at most to 20. Any ideas what is causing the others not to show. Thanks Dave August 19, 2020 at 3:52 am #1409176 DavidStaff Customer Support Hi there, try including the Post Navigation on the CPT. Tom provides a method to do that here: https://generatepress.com/forums/topic/displaying-posts-navigation-on-cpts/#post-466321 August 19, 2020 at 3:58 am #1409182 David Hi David If I turn infinite scroll off in blog settings, I get the page navigation back. How can I set the number of post to initial show on custom post types, and also use the infinite scroll? Thanks Dave August 19, 2020 at 4:21 am #1409210 DavidStaff Customer Support See Tom’s reply here: https://generatepress.com/forums/topic/use-generatepress-infinite-scroll-in-custom-blog-page/#post-1399716 August 19, 2020 at 4:48 am #1409237 David Ok thanks, I’ll look into adding the infinite scroll, only other things is how do I change the option of how many posts show on the archive page? August 19, 2020 at 5:32 am #1409294 DavidStaff Customer Support You can use the pre_get_posts hook to change the posts_per_page like sp: add_action( 'pre_get_posts', function( $query ) { if ( is_admin() || ! $query->is_main_query() ) { return; } if ( is_post_type_archive( 'my_custom_post_type' ) ) { $query->set( 'posts_per_page', 9 ); } } ); August 19, 2020 at 5:46 am #1409314 David I added this to function.php but nothing changed add_action( 'pre_get_posts', function( $query ) { if ( is_admin() || ! $query->is_main_query() ) { return; } if ( is_post_type_archive( 'glamping' ) ) { $query->set( 'posts_per_page', 12 ); } } ); August 19, 2020 at 7:03 am #1409422 DavidStaff Customer Support Odd as thats a standard WP function. Have you spoken with the Plugin author? as it seems to be doing things differently. August 19, 2020 at 7:32 am #1409481 David Yes all sorted thanks David August 19, 2020 at 7:47 am #1409504 DavidStaff Customer Support Glad to hear that. Author Posts Viewing 10 posts - 1 through 10 (of 10 total) You must be logged in to reply to this topic. Log In Username: Password: Keep me signed in Log In