Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

The right method depends on your theme. Jetpack Infinite Scroll is the quickest low-code option for a compatible classic theme, but Jetpack’s developer documentation says it is not supported for block themes. Block-theme sites should use a maintained alternative, native Query Loop pagination, or a custom implementation built with the WordPress REST API or WP_Query.

Whichever method you choose, keep ordinary, crawlable paginated URLs. Infinite loading should enhance the listing, not be the only way readers or search engines can reach older posts.

Choose an implementation path

Approach Theme compatibility Setup and control Best fit
Jetpack Infinite Scroll Supported classic themes; not block themes Lowest code; theme controls the content container and rendering. Automatic mode has a documented seven-post default batch; click mode follows the “Blog pages show at most” setting unless overridden. A classic-theme blog that wants a quick enhancement
Custom REST API loader Any theme capable of running JavaScript and rendering post markup Full control over batch size, loading state, markup and stopping logic Sites needing a tailored front end or headless-style behavior
Custom WP_Query loader Any PHP theme or template Server-side control and native WordPress queries; requires theme development Traditional themes that want to reuse their existing loop
Query Loop pagination Block-editor sites Native block option documented for pagination rather than infinite scroll Block themes where reliable page navigation matters more than automatic loading

Jetpack’s feature overview is at https://jetpack.com/infinite-scroll/. Its theme-integration requirements and unsupported block-theme status are documented at https://developer.jetpack.com/docs/customization/theme-support/infinite-scroll-theme-support/.

Use Jetpack Infinite Scroll on a compatible classic theme

1. Confirm that the theme is eligible

Check that the site uses a classic theme and that its templates provide a single, valid container for the posts being appended. A block theme is not supported by Jetpack’s documented integration, so do not enable it expecting the feature to work there.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

2. Enable the feature in Jetpack

  1. Open the Jetpack dashboard for the site.
  2. Enable Infinite Scroll in Jetpack’s available features.
  3. Visit the blog, archive and search listings and verify that another batch appears as you scroll or activate the load button.

The exact controls and available mode can vary with the theme’s integration. Treat the documented seven-post automatic batch as Jetpack’s default behavior, not a promise that every configuration will load exactly seven posts.

3. Add theme support when developing the theme

A theme can declare support and identify the element that receives new posts. Jetpack’s developer example uses this pattern:

add_theme_support( 'infinite-scroll', array(
    'container'      => 'content',
    'render'         => 'my_infinite_scroll_render',
    'footer_widgets' => true,
) );

The container value must match the post-list element in the theme’s markup. The theme’s render callback should output posts using the same structure and classes as the initial loop; otherwise cards can lose styling, metadata or interactive behavior after loading.

4. Choose automatic scroll or click-to-load

Jetpack documents both scroll and click modes. Automatic mode requests another batch when the visitor reaches the trigger point. Click mode adds an explicit control. In click mode, the number of posts normally follows WordPress’s “Blog pages show at most” setting unless the theme sets posts_per_page in the integration.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

Click-to-load is often the safer choice when the site has footer widgets: continually appending posts can push the footer farther away, while a button gives readers a deliberate way to stop and reach it. Test keyboard operation, focus movement, screen-reader announcements and the footer on the actual theme; the documentation does not establish that every configuration is accessible by default.

Build a custom loader with the WordPress REST API

The REST API approach separates fetching from rendering. Request a modest page of posts, append the returned markup to the existing list, and stop when the response reports that no pages remain. The pagination parameters and response headers are documented in the WordPress REST API pagination handbook.

Request bounded pages

The posts collection accepts page, per_page and offset. per_page is capped at 100, but a smaller batch generally produces a faster, less disruptive interaction. Responses include X-WP-Total and X-WP-TotalPages headers, which let the loader determine when to stop.

const list = document.querySelector('.post-list');
let page = 1;
const perPage =  six;
let totalPages = 1;

async function loadNextPage() {
  page += 1;
  const response = await fetch(
    `/wp-json/wp/v2/posts?page=${page}&per_page=${perPage}`
  );

  if (!response.ok) {
    throw new Error(`Request failed: ${response.status}`);
  }

  totalPages = Number(response.headers.get('X-WP-TotalPages')) || totalPages;
  const posts = await response.json();

  posts.forEach((post) => {
    const item = document.createElement('article');
    item.innerHTML = post.title.rendered + post.excerpt.rendered;
    list.appendChild(item);
  });

  if (page >= totalPages || posts.length === 0) {
    document.querySelector('.load-more')?.remove();
  }
}

Replace the illustrative perPage value with the batch size your design and performance budget can support, and render trusted fields through an appropriate escaping/sanitization strategy. In production, add a loading indicator, disable duplicate requests, handle network errors, and preserve the theme’s normal post links and HTML structure. If the site uses custom post types, query the relevant REST route and confirm that it is exposed in the API.

Free tools Windows power users keep installed

One-click scans. No signup required.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

Build the feed with WP_Query

A PHP implementation can reuse the theme’s existing loop and template parts. WP_Query supports posts_per_page and paged; see the class reference.

$paged = max( 1, get_query_var( 'paged' ) );
$query = new WP_Query( array(
    'post_type'      => 'post',
    'posts_per_page' => 6,
    'paged'          => $paged,
) );

if ( $query->have_posts() ) {
    while ( $query->have_posts() ) {
        $query->the_post();
        get_template_part( 'template-parts/content', get_post_type() );
    }
}
wp_reset_postdata();

For a static front-page template, WordPress documents a caveat: the page number may be available through get_query_var( 'page' ) rather than paged. Account for that when the loader is attached to a static front page.

Your JavaScript can request a server-rendered fragment for the next page, insert it after the current list, and update the next-page state. Reusing the theme’s template part is preferable to creating a second card format that can drift from the initial page.

Independent reader supportYour contribution helps us test, update, and keep practical guides available for everyone.Support on Ko-Fi

Keep infinite scroll discoverable in Google Search

Do not make scrolling or clicking the sole mechanism for exposing older posts. Google’s current guidance on lazy-loaded content is at https://developers.google.com/search/docs/crawling-indexing/javascript/lazy-loading.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.
  • Keep normal paginated archive URLs, such as /page/2/, available.
  • Give each page a stable, unique URL with a predictable set of posts.
  • Link sequentially between pages so crawlers can discover later entries without executing an interaction.
  • Make sure the content represented by a URL does not change unpredictably between requests.
  • Use infinite loading as progressive enhancement: visitors with JavaScript disabled should still have usable pagination.

This guidance describes discoverability and crawler access; it does not establish that infinite scroll itself is a ranking penalty.

Test before publishing the change

  • Theme behavior: New posts appear inside the intended container and retain the same markup, styling and links as the first batch.
  • Pagination: Loading stops at the final page and does not duplicate or skip posts.
  • Failures: A timeout or server error leaves a retryable control and does not trap the visitor in a perpetual spinner.
  • Accessibility: Keyboard users can activate the control, focus is handled predictably, and inserted content is announced where appropriate.
  • Footer access: Visitors can reach footer widgets; use click-to-load when automatic loading makes that impractical.
  • Responsive performance: Batch size, images and scripts remain reasonable on mobile connections.
  • Search access: Each paginated URL works directly, contains the expected posts and links to the next page.
  • Special templates: Archives, categories, tags, author pages and static front pages use the correct query and page variable.

Block-theme alternative: use Query Loop pagination

For a block theme, Jetpack’s documented Infinite Scroll integration is unavailable. The WordPress Query Loop block provides native post listings with pagination controls; its documentation is at https://wordpress.org/documentation/article/query-loop-block/. Configure the Query Loop and Pagination blocks in the Site Editor, then keep those page links as the dependable navigation layer. If automatic loading remains a requirement, implement it against the REST API or a maintained solution that explicitly supports block themes, while preserving the same paginated URLs.

Product prices and availability are accurate as of the date/time indicated and are subject to change. Any price and availability information displayed on Amazon at the time of purchase will apply.