Home › Forums › Product Support Forums › Ajax Search Pro for WordPress Support › Number of the counter in "show more results"
This topic contains 3 replies, has 2 voices, and was last updated by Ernest Marcinko 6 years, 6 months ago.
- AuthorPosts
- March 14, 2017 at 7:51 pm #12305
Hi.
A customer has bought this plugin, and congratulations, it works great. But we have a small problem.
The link to show more results always shows a maximum number, 45, does not show the true total of results found.
For example: Search for the word Madrid, and the first 5 results in ajax appear, and below, the link to see more results to go to the results page. But in that link to see all other results always appears with the same number. View more results (45). But the truth is that there are many more result for Madrid.
This also happens if no word is entered in the search engine and the search is executed. The first 5 posts are displayed in ajax and in the link to see more results the counter appears in 45, when there really are many more.
What can this be due to ?, How can you show the actual number of results found in the More Results … link?
I need the counter number of the “show more results” link to be the correct one, actually showing the total of posts found for that criterion, or, that no number or counter appears, only the “more results”
Thanks.
March 14, 2017 at 8:26 pm #12311Hi!
Thank you very much for your kind words!
It’s actually an intended behavior, partially. It is because there is a ‘hard-limit’ on total results, which is calculated based on the general limit and a modifier as: limit * 10 (modifier), in your case 5 * 10 = 50 in total. This is to prevent displaying too many results at a time and soft-limit the ajax calls a tiny bit. Plus to improve accuracy, because in some cases the total number & the actual number returned may differ a small bit.
It is however possible to change this modifier now, as it has been requested before the current release, however a small code snippet is required for that. To change the modifier, place the following code snippet to the functions.php file in your currently active theme directory (copy from line 3):
This will change the modifier to 20, so the more results will most likely display 95 then. Feel free to increase this modifier value, but I suggest staying within 10 – 100 for the best experience.
Best,
Ernest Marcinko
If you like my products, don't forget to rate them on codecanyon :)
March 14, 2017 at 10:14 pm #12315Thanks for your quick response.
And you can remove the number and the counter, do not display any counter. Only appear and show the text of the link “more results”.
Thanks again.
March 14, 2017 at 10:27 pm #12316Hi,
It is actually possible to hide the number section with a small custom CSS code:
Best,p.showmore span { display: none !important; }
Ernest Marcinko
If you like my products, don't forget to rate them on codecanyon :)
- AuthorPosts
You must be logged in to reply to this topic.