---
title: "How to Add Ajax Load More Button to Search Results in WordPress?"
url: https://nexterwp.com/docs/add-ajax-load-more-button-to-search-results-in-wordpress/
date: 2024-12-02
modified: 2026-09-27
lang: en
author: "Aditya Sharma"
description: "Page numbers make a visitor decide where to go. A load more button asks them one question at a time: do you want to see more of this? For search..."
image: https://nexterwp.com/wp-content/uploads/2024/12/How-to-Add-Ajax-Load-More-Button-to-Search-Results-in-WordPress_-1024x519.jpg
word_count: 517
---

# How to Add Ajax Load More Button to Search Results in WordPress?

## Key Takeaways

- Nexter Blocks Search Bar funciona en la edición Free cuando Nexter Blocks Pro está desactivado, y el bloque se activa desde Nexter > Blocks en el panel de WordPress.
- La configuración de load more separa el tamaño del primer lote del tamaño de los lotes siguientes, y permite escribir tres etiquetas: la etiqueta en reposo, la etiqueta mientras carga y el mensaje final cuando no queda nada.
- AJAX search debe estar activado para que los resultados aparezcan mientras se escribe; con AJAX search desactivado, la barra actúa como un formulario normal que envía a la página de búsqueda propia de WordPress.

Page numbers make a visitor decide where to go. A load more button asks them one question at a time: do you want to see more of this?

For search results, where relevance drops as you go down the list, that is usually the better question.

*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.** With everything fitting in the first batch there is nothing for the button to do.

## Steps

- Select your **Search Bar** block and set how many results the first batch shows.

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

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

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

- Set the button label, the loading label and the message shown when everything has been loaded.

![Load more button labels](https://nexterwp.com/wp-content/uploads/2026/09/sb-loading-loadmore.webp)

- Publish and search for something with plenty of matches.

![The load more button in use](https://nexterwp.com/wp-content/uploads/2026/09/sb-fe-loadmore.webp)

## How It Behaves

Measured: switching to load more wrote the behaviour and every label onto the block, including a custom button text, so the script renders the control without another request.

- **Three labels, three states.** The resting label, the label while a batch is loading, and the message when there is nothing left. All three are yours to write.- **The batch size is separate from the first page size**, so you can show a generous first screen and load smaller batches after it.- **A running total can be shown** beside the button, so the visitor knows how much is left.- **Results append to the list.** Nothing already on screen is replaced.- **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 list gets long.** After several batches a visitor is a long way from the search box, with no way back but scrolling.- **Nothing is in the URL.** A loaded-out list cannot be linked to or restored by the back button.- **Each press is a request.** Larger batches mean fewer round trips.- **Only one loading behaviour at a time.** Load more, pagination and lazy loading are alternatives.- **The button stays until the list is exhausted**, so a visitor cannot tell how many presses remain unless you show the total.

## Troubleshooting

### The button never appears

Everything matched fits in the first batch. Lower the batch size or search a broader term.

### Pressing it does nothing

AJAX search has to be on for the block to fetch the next batch in place.

### The button stays after everything has loaded

Set the all-loaded message. It is what replaces the button when the list is exhausted.

### I would rather it loaded automatically

Use the lazy load behaviour instead. See the [lazy load doc](https://nexterwp.com/docs/add-ajax-lazy-load-to-search-results-in-wordpress/).

## Related Docs

- [Add AJAX lazy load to search results](https://nexterwp.com/docs/add-ajax-lazy-load-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 a load more button to WordPress search results?**
A: The setup only works when the Search Bar block is enabled under Nexter &gt; Blocks, published content exists for it to search, and the first batch does not already contain every match. Nexter Blocks Pro is not required here, because the Search Bar renders identically with Pro deactivated. That matters because the button only has something to do when there are more results than the initial batch size.

**Q: How do I make WordPress search results load more instead of paginating?**
A: Set the Search Bar block’s loading behaviour to load more, then define the first batch size and the three labels for resting, loading, and all-loaded states. Nexter Blocks writes that behaviour and those labels onto the block, so the control can render without another request. The practical win is that results append in place instead of replacing what is already on screen.

**Q: Why does the load more button not appear in my search results?**
A: The usual reason is that everything already fits inside the first batch. When that happens, there is nothing left for the button to load, so it never shows up. Lowering the batch size or searching for a broader term creates more matches and gives the button a job to do.

**Q: Why does clicking the load more button do nothing?**
A: AJAX search has to be switched on for the block to fetch the next batch in place. With AJAX search off, the bar behaves like a plain form that submits to WordPress’s own search page instead of loading more results inline. That difference matters because load more depends on in-place requests, not a full page submit.

**Q: What is the best way to handle long WordPress search result lists?**
A: Load more is better when relevance drops as you go down the list and you want visitors to choose whether they want another batch. It keeps each request tied to one extra chunk of results, and larger batches mean fewer round trips. The tradeoff is that long lists push people far from the search box, so this pattern works best when you want controlled browsing rather than automatic expansion.

**Q: Is there another way to add AJAX loading besides a load more button?**
A: Lazy load and pagination are the other two loading behaviours mentioned for search results. Only one loading behaviour can be active at a time, so load more, pagination, and lazy loading are alternatives rather than stackable options. If you want automatic loading instead of a button, use [Add AJAX lazy load to search results](https://nexterwp.com/docs/add-ajax-lazy-load-to-search-results-in-wordpress/).
