Number of the counter in "show more results"

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 Ernest Marcinko 5 years, 3 months ago.

Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
    Posts
  • #12305
    raulpuhu
    raulpuhu
    Participant

    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.

    #12311
    Ernest Marcinko
    Ernest Marcinko
    Keymaster

    Hi!

    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 :)


    #12315
    raulpuhu
    raulpuhu
    Participant

    Thanks 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.

    #12316
    Ernest Marcinko
    Ernest Marcinko
    Keymaster

    Hi,

    It is actually possible to hide the number section with a small custom CSS code:

    p.showmore span {
        display: none !important;
    }
    Best,
    Ernest Marcinko

    If you like my products, don't forget to rate them on codecanyon :)


Viewing 4 posts - 1 through 4 (of 4 total)

You must be logged in to reply to this topic.