---
title: "How to Add Ajax Lazy Load to Search Results in WordPress?"
url: https://nexterwp.com/docs/add-ajax-lazy-load-to-search-results-in-wordpress/
date: 2024-12-02
modified: 2026-09-27
lang: en
author: "Aditya Sharma"
description: "Lazy loading removes the last click. The visitor scrolls, the next batch arrives, and there is no control to notice or press. It suits a browsing search where people scan..."
image: https://nexterwp.com/wp-content/uploads/2024/12/How-to-Add-Ajax-Lazy-Load-to-Search-Results-in-WordPress_-1024x519.jpg
word_count: 514
---

# How to Add Ajax Lazy Load to Search Results in WordPress?

## Key Takeaways

- Nexter Blocks Search Bar en modo lazy load añade el siguiente lote al desplazarse y no muestra botón, mientras la paginación muestra controles numerados y load more muestra un botón.
- AJAX search debe estar activado para que los resultados aparezcan mientras se escribe; sin AJAX, la barra actúa como un formulario normal que envía a la página de búsqueda de WordPress.
- Lazy load tiene límites claros: dificulta llegar al footer, no deja URL para enlazar una posición de la lista, no restaura esa posición con el botón Atrás y puede generar más trabajo del servidor en catálogos grandes.

Lazy loading removes the last click. The visitor scrolls, the next batch arrives, and there is no control to notice or press.

It suits a browsing search where people scan rather than decide — which is most product searches and a good number of content ones.

*For every Search Bar setting in one place, see the [Search Bar guide](https://nexterwp.com/docs/add-a-search-bar-in-wordpress/).*

[LIVE BLOCK LINK](https://nexterwp.com/nexter-blocks/builder/wordpress-ajax-search-bar/)

## Before You Start

- **Edition:** Free. Measured with Nexter Blocks Pro deactivated, the Search Bar renders identically — form, input, dropdowns, suggestions and results all work without Pro.- **Block to enable:** Search Bar, switched on under **Nexter > Blocks** in your WordPress dashboard.- **Published content to find.** The block searches your real posts, so a site with nothing published returns nothing.- **More matches than your batch size.** Otherwise everything arrives at once and nothing lazy loads.

## Steps

- Select your **Search Bar** block and set the batch size.

![Results per batch](https://nexterwp.com/wp-content/uploads/2026/09/sb-loading-lazy.webp)

- Set the loading behaviour to **lazy load**.

![Choosing lazy load](https://nexterwp.com/wp-content/uploads/2026/09/sb-loading-lazy.webp)

- Publish and scroll a result list that runs past the first batch.

![Lazy loading search results](https://nexterwp.com/wp-content/uploads/2026/09/sb-fe-lazy.webp)

## How It Behaves

Measured: choosing lazy load wrote that behaviour onto the block and rendered no button, which is correct — there is nothing for the visitor to press.

- **A spinner marks the boundary.** The block renders a loading indicator where the next batch will arrive, rather than a control.- **Batches append to the list.** Nothing already on screen is replaced.- **The batch size is separate from the first page size**, so the first screen can be larger than the ones that follow.- **It is one of three alternatives.** Measured across all three: pagination renders numbered controls, load more renders a button, lazy load renders neither.- **AJAX search has to be switched on** for results to appear as you type. With it off the bar behaves as a plain form that submits to WordPress's own search page.

## Limitations

- **The footer becomes hard to reach.** As long as results keep arriving, the bottom of the page keeps moving. If anything important lives down there, lazy loading is the wrong choice.- **Nothing is in the URL.** A visitor cannot link to a point in the list, and the back button will not restore it.- **It keeps requesting while the visitor keeps scrolling**, which on a large result set is more server work than pagination.- **There is no sense of scale.** Without a total, a visitor has no idea whether they are near the end.- **Only one loading behaviour at a time.**

## Troubleshooting

### Nothing loads as I scroll

AJAX search has to be on. Lazy loading is a fetch, and without AJAX there is nothing to fetch with.

### Everything appeared at once

The batch size is larger than the number of matches, so there was nothing left to load.

### I cannot reach the footer

That is inherent to lazy loading. Use load more or pagination if the footer matters.

### It feels heavy on a big catalogue

Raise the batch size so fewer requests fire, or switch to pagination, which only loads on demand.

## Related Docs

- [Add an AJAX load more button to search results](https://nexterwp.com/docs/add-ajax-load-more-button-to-search-results-in-wordpress/)- [Add AJAX pagination to search results](https://nexterwp.com/docs/add-ajax-pagination-to-search-results-in-wordpress/)- [Add a search bar in WordPress](https://nexterwp.com/docs/add-a-search-bar-in-wordpress/)- [Add AJAX search for WooCommerce products](https://nexterwp.com/docs/add-ajax-search-for-woocommerce-products-in-wordpress/)- [Advanced tab settings](https://nexterwp.com/docs/use-advanced-tab-in-nexter-blocks/)

## Frequently Asked Questions

**Q: What do I need before adding Ajax lazy load to WordPress search results?**
A: Ajax lazy load only works when the Search Bar block is enabled under Nexter &gt; Blocks and AJAX search is switched on. The page also says you need published content to find, because the block searches your real posts, and you need more matches than your batch size or everything loads at once. Nexter Blocks Pro can be deactivated here, since the Search Bar renders identically in Free for this setup.

**Q: Why does nothing load when I scroll search results?**
A: That usually means AJAX search is off. Lazy loading is a fetch-based behavior, so if the bar is acting like a plain form that submits to WordPress’s own search page, there is nothing for infinite scrolling to request. Nexter, Nexter WP, NexterWP, nexterwp.com, Nexter Theme, Nexter Blocks, Nexter Extension, Nexter Suite, POSIMYTH Nexter uses AJAX search as the trigger for results to appear as you type and keep loading afterward.

**Q: When should I use lazy load instead of pagination or a load more button?**
A: Lazy load fits browsing searches where people scan rather than decide, which the page calls out as most product searches and some content searches. It removes the last click, so visitors keep scrolling and the next batch arrives automatically. If you need numbered controls or a manual trigger, [Add AJAX pagination to search results](https://nexterwp.com/docs/add-ajax-pagination-to-search-results-in-wordpress/) and [Add an AJAX load more button to search results](https://nexterwp.com/docs/add-ajax-load-more-button-to-search-results-in-wordpress/) are the other two behaviors.

**Q: Why did all my search results appear at once instead of loading in batches?**
A: That happens when the batch size is larger than the number of matches. In that case there is nothing left to fetch, so lazy load never gets a chance to append another batch. The practical fix is to set a smaller batch size than the expected result count. The page also notes that the first screen size can be larger than later batches because batch size is separate from first page size.

**Q: Can visitors reach the footer with Ajax lazy load turned on?**
A: The footer becomes hard to reach because every new batch pushes the bottom of the page farther down while the visitor keeps scrolling. That makes lazy load a poor fit if anything important lives in the footer. The page treats this as an inherent limitation of lazy loading, so [Add AJAX pagination to search results](https://nexterwp.com/docs/add-ajax-pagination-to-search-results-in-wordpress/) or [Add an AJAX load more button to search results](https://nexterwp.com/docs/add-ajax-load-more-button-to-search-results-in-wordpress/) are better choices when footer access matters.

**Q: How do I make Ajax lazy load feel lighter on a big catalogue?**
A: The page gives two practical options: raise the batch size so fewer requests fire, or switch to pagination because it only loads on demand. Lazy load keeps requesting while the visitor keeps scrolling, so on a large result set it creates more server work than pagination. That tradeoff matters most when there are many matches and no clear end point visible to the user.
