I figured out the answer to my own question (finally!). I’m using the NineToFive template and I guess by default there’s a limit on the number of search results that’s returned (I’m not sure if that’s a WordPress default; maybe someone can clarify that).
I changed my query to this:
$s = new WP_Query(array('s' => $search_term, 'posts_per_page' => -1));
To not put a limit on the search results and that changed it. I needed to find every possible search term on page 1 in order to cross reference it with the location but it was ‘paginating’ the search results.
Thanks for your help!
Related Posts:
- Can I force WP_Query to return no results?
- Refine search results using WP_Query
- How to make search for posts using get method?
- How do I get my custom query to work with search results after the first page?
- Search.php – return number of results but cannot loop through
- Custom search (wp query by custom fields)
- Help with showing text when something is entered in my search bar
- Resetting post data to previous loop in nested loops
- Pagination returns 404 after page 20
- Make loop display posts by alphabetical order
- get custom post type by tag
- Order Search Results Page by meta_value If no Value Return Remaining Results
- Executing Queries in tag.php
- Tracing the life of a query
- Group posts by custom field
- Trying to list out child pages with WP_Query
- Transient pagination not working properly
- get_posts() seemingly ignoring post_type
- Search widget breaks when using multiple loops?
- Woocommerce custom loop to show all the products [closed]
- How to show the posts of some category first, and then all other
- Why execute the_post()?
- Pagination stops at page 6
- Paginated HTML Sitemap
- WP Query search for attachments and their exact title
- Why does the_content not work like others for a set post id?
- How to limit total number of posts in wp query loop?
- Pagination is broken and I need help fixing it
- Creating a custom search for a specific post type
- have_posts() execution failure
- How to vary post loop results layout and resume?
- Get a post from other loop each n-posts in the main loop
- Search for multiple tags?
- Loop returning only 1 result
- How to use wp_query to post count by search term > group post count by date > convert to json. (ex. result 12-21-2020 – 343)
- Show post number in widget loop
- Extend product search with meta in WooCommerce
- posts_per_page not working for first page of pagination
- Loop Performance > JSON files vs. WP_Query vs. REST API
- Search form not working with custom query?
- WordPress ignoring LIMIT / posts_per_page despite being in wp_query
- Conflict with get_posts and the_content
- WordPress | Date not always appear [duplicate]
- How do I rewrite this loop as a new WP_Query style-loop?
- How to provide meta_key array to wp_query?
- Trying to retrieve random post, getting a page
- Multiple Rows in a using wp_query
- Meta query compare for ID’s greater than specific ID
- How to avoid bypass of search bar rules?
- Hide products in uncategorized category from search results
- How do you determine if a result in a search query is a post or a page?
- How to split a post and intercalate elements from a loop
- PHP – Loop custom post type categories within jQuery Tabs
- How to create a widget like this?
- WP_Query with one category in args shows other categories
- Ordering posts by custom field and grouped by month
- relation OR instead of AND – Filtered term ID’s in loop
- Does query_posts have an effect on get_the_category?
- Second loop pagination changes URL, not content
- Ignore image urls in wp_query search
- Compare “Main” post ID to ID inside wp_query loop
- Performance concerns: index.php vs taxonomy-$taxonomy.php
- Why does apply_filters behave different inside and outside a loop?
- Custom template for password protected page
- problem with the loop
- How can I do a orderby by the number of items? So basically list by starting with the array with the largest number of post
- Function the_posts_pagination() not compatible with WP_Query arguments
- How to prevent WP_Query from filtering on ‘s’ but keep ‘s’ for other purposes?
- Add dynamic search to paginated WP_Query
- Prevent Duplicate Post Counted by Query
- Multiple WP_Query args combinations according to post type
- Show custom content when loop or wp query reaches specific time?
- How to show specify category template for both parent and child category
- Pagination inside the blog page not working
- Woocommerce featured products query no longer working
- Custom Query Pagination not working on static front page
- WordPress search page pagination displaying but not functional
- query all posts published by certain user id
- How can I modify standard search query to include also ACF custom fields values?
- modifying the loop multiple times with arguments passed through ajax to wp_query
- WP_Query causing links to not work
- Retrieving category pages from subcategory returns empty sets
- WP_query for posts with same post type AND same post category
- Iterate through ID’s in loop
- Loop through multiple custom fields with increasing number
- Different number of posts showing in development vs production server
- An archive page without post format (just standard post)
- Need help setting up a search form for wordpress [duplicate]
- Sorting Posts Based On Meta Value Using AJAX
- Converting an existing query_posts to WP_Query
- Pull Instagram images into an existing loop?
- Loop being strainge
- Multiple loop for “featured” items returns wrong posts
- Pagination in custom query not working [duplicate]
- Problem with WP_Query sort
- Get author meta data with no published posts in author.php?
- How to write a query-function as a query-shortcode?
- First post outside of loop, homepage only?
- Filtering product search results using tags
- Query All Posts: Either Display Most Recent or One with Particular ACF Value Chosen