Hi,
first of all let me say thank you for your great work and the amazing plugin you’ve built…
It really saved me a big amount of developing hours. 🙂
But…I have got a question:
Basically I set up an ajax infinite scroll on my search result page…and everything is working fine.
Also I followed your instructions and had a look into the result-infinite-scroll.php in order to customize the final message when “all posts are loaded”. And it works.
However there’s an issue I couldn’t solve yet. And is the following:
If you set search parameters and the reaserch don’t come up with any result, the message that you will get…is exactly the same that I set for the “infinite scroll end” and it should be consider a mistake.
Because in one case you loaded all posts, in the other case you don’t have any post that is matching your searching criterias.
I looked through this and consirered the value of $wp_query, exactly:
$wp_query->post_count
$wp_query->found_posts
$wp_query->current_post
But basically couldn’t find out a solution…. in the last “ajax call” ( when all post are loaded) it get back the same value you have in “no result case”, so you are not able to know wich case is.
Is there any way to solve it, in order to get 2 different messages?
Thanks
Matteo