The Stack Overflow podcast is back! Listen to an interview with our new CEO.
2 deleted 2 characters in body
source | link

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 count($search->posts)>post_count.

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 count($search->posts).

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.

1
source | link

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 count($search->posts).