WP_Query::found_posts
contains the number of matches to your query without taking into account limit and offset. limit is the max number of posts which can be display in an archive page and the offset depends on the paged
parameter and is usually ($paged - 1) * $limit
.
So what you got is the number of results you would have gotten for your search query if you asked to get all the posts that match the search criteria.
If you need to know the number of the results for the specific query including the limit and offset you can simply do $search->post_count
.
Related Posts:
- Can I force WP_Query to return no results?
- Refine search results using WP_Query
- Custom Search Not Consistent with Results
- 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?
- Custom search (wp query by custom fields)
- Help with showing text when something is entered in my search bar
- Some doubts about how the main query and the custom query works in this custom theme?
- Using a custom WP_Query with get_template_part loop
- Loop within a loop?
- Display posts the match taxonomy term linked from wp_list_categoies?
- WordPress Custom Query to show posts from last x years
- Pagination with 5 posts per page
- How to support multiple search terms query within one process?
- Merging a complex query with post_rewind and splitting posts into two columns
- Pagination wont work with search results template [duplicate]
- Pagination Not working on Home Page with 2 Query
- meta_query not working properly
- Exclude post on loop by multiple meta key value
- Sort by meta key on archive page
- Splitting the main query in multiple loops with query_posts and/or pre_get_posts?
- Query sticky posts with thumbnails
- Show all parents and children in custom post type in right order
- Why is this coming back as null? Thats wrong. There is one post
- Searching through different categories on different pages code is not working
- Ignore post by meta value in the main query
- WP_Query’s “request” SQL Query
- How to retrieve current page WP_Query arguments?
- is_search was called incorrectly
- How do I search inside specific taxonomies in WordPress
- How to limit WP_Query to one result on the loop?
- if/else on custom query gives 200 OK when condition not met?
- Complex date range with WP_Query and BETWEEN
- Random loop with code to prevent duplicate output returns no output at all from time to time
- How to loop for every result found in the_content() when using the search query?
- How to use offset in WP_Query
- showing all search result in one template
- Multiple loops without repeating content
- Can I set my WP_Query to be a Main Query?
- Multiple Search Terms WP_Query
- Filtering posts from different categories into different section by doing WP_Query only once
- WP Query Args – Title or Taxonomy Value
- wordpress search word, “hello world” ===> ‘hello+world’ ===> ‘hello’, ‘world’
- Categorising search results based on Custom Fields
- using pre_get_posts for search results not found
- Custom taxonomy.php not working
- different for loop if screen resolution < 1000px
- Transient api Caches confused
- sort and display posts by custom field (wp-query and the loop))
- Get posts that do not have the same tags as current
- Redirect Search to Form When No Product Results Are Found
- Exclude a Woocommerce product from WP_Query
- Issues with search after added meta_query
- inserting content of 1 Post to in another with a template hierarchy
- Expecting statement error from php loop using ACF plugin
- How to search for meta_query LIKE or tax_query LIKE and grab these posts on search results?
- How do I sort this custom list of sticky posts
- Pagination for custom loop on custom page template is not displaying anything
- Filtering by multiple conditions in the loop
- How to access $wp_query object from array of posts given by get_posts?
- Display all attached image of every post of custom post type and link to original post
- Writing less unnecessary code with WordPress
- I am officially missing something about transient posts
- How do I get the content of a custom instance of WP_Query?
- Searching not only by post name but also category
- Block internal search queries with pre_get_posts and regex rules
- Search Exact on WordPress – Relevannsi Solution Not Working
- How can I have sticky posts while ALSO showing posts from a specific category using one WP_Query?
- I have problems with the search query using multiple post types
- ACF: How can I publish values of ACF fields in a loop while using wp_query?
- Can I alter the main loop to ‘orderby’ a custom callback?
- Show a message if there are no active posts in category
- WooCommerce | AJAX | Product Pagination | Help me implement Ajax Pagination
- post_type incorrect for custom post type
- Problem with my loops
- display the children of the post using the current page as the main parent
- Display 3 levels of categories on page
- Paging works correctly on local version, but not live?
- Custom post type loop error: Trying to get property of non-object
- Search Field that allows options of “Match any keyword” or “Match all keywords”
- How to add in WP_Query to every 3 posts displayed? [duplicate]
- A very strange problem with search query
- Display three sequential posts on each page load, without repeating previous
- How to make a wordpress loop file that displays posts based on certain conditions
- Custom loop – Isolating post meta output depending on current query taxonomy terms
- Issue in If else condition [closed]
- Pagination not working with WP_QUERY
- How do I display posts with specific value in a custom field into my loop?
- Search Query that Includes Custom Table
- Order by multiple meta keys on wordpress
- wp_query pagination links producing 404
- Display First posts without the default featured image
- Pagination problem with multiple loops on the same page
- Can’t seem to get an else statement correct? [closed]
- Output ACF field dynamicaly within a taxonomy loop [closed]
- Why does WP_Query not search for two ‘meta_query’ keys separated with OR?
- How do I split a large query with a semi-expensive function included into multiple smaller queries
- WordPress WP_Query Search (‘s’) With Multiple Search Terms
- Search results stuck on page 1
- Pagination only showed when no category is set in wp_query