In this example:

Ajax Load More will search content based on keyword value using the Search query parameter.

Ajax Load More offers free extensions that integrate with the popular WordPress search plugins SearchWP and Relevanssi.

Did You Know: The Filters add-on provides a text input filter to easily render and display search results with Ajax Load More – View Example.

The following code should be placed inside a page template where you render Ajax Load More.

<?php
$term = is_search() ? get_search_query() : $_GET['term']; // get search query or `term` from query string.
if ( empty( $term ) ){
   $term = 'WordPress';
}
echo do_shortcode( '[ajax_load_more post_type="post, page" search="' . esc_attr( $term ) . '" orderby="relevance"]' );
PHP

Your search for "WordPress" returned the following results:

The following shortcode was used to create the Search Results example.

[ajax_load_more preloaded="true" preloaded_amount="3" posts_per_page="3" search="' . $term . '" orderby="relevance"]

Variables are being passed into this Ajax Load More shortcode using theĀ do_shortcode method.

The following Repeater Template was used to create the Search Results example.