Tell me more ×
WordPress Answers is a question and answer site for WordPress developers and administrators. It's 100% free, no registration required.

How can one set blog for unlimited vertical scroll through all posts?

share|improve this question

closed as not a real question by s_ha_dum, brasofilo, Bainternet Feb 13 at 7:18

It's difficult to tell what is being asked here. This question is ambiguous, vague, incomplete, overly broad, or rhetorical and cannot be reasonably answered in its current form. For help clarifying this question so that it can be reopened, see the FAQ.

1 Answer

If you want to load the posts as you scroll, you can use the infinite scroll plugin.

If you want all posts pages to load all posts on initial page load, you can go to the Settings > Reading page in admin and enter -1 in the Blog pages show at most field.

If you want to load all posts on a particular page on initial page load on a particular type of posts page, you can use the pre_get_posts action to modify the query just for that page. For example, on the home page:

function wpa85665_all_posts_on_home( $query ) {
    if ( $query->is_home() && $query->is_main_query() )
        $query->set( 'posts_per_page', -1 );
}
add_action( 'pre_get_posts', 'wpa85665_all_posts_on_home' );

See the other Conditional Tags to limit the modification to other types of pages.

share|improve this answer
Excellent answer (both options)!! (glad you could follow the wording of my question) Thank you! – user27384 Feb 20 at 6:28

Not the answer you're looking for? Browse other questions tagged or ask your own question.