Result Count Issue

This topic contains 1 reply, has 2 voices, and was last updated by Ernest Marcinko Ernest Marcinko 4 months, 4 weeks ago.

Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
    Posts
  • #35997
    alivez64
    alivez64
    Participant

    Hello,
    My Plugin Doesn’t count and shows the all results correctly, I’ve 30,000+ posts but it counts and shows only up to 72 results for any keywords.
    you can check that on my website.
    for example. I’ve more than 5000 posts for the tag ” yoga” but when I search for yoga it shows only up to 72 results.
    How can i fix that? what is the problem?
    kind regards,
    Ali

    Attachments:
    You must be logged in to view attached files.
    #36005
    Ernest Marcinko
    Ernest Marcinko
    Keymaster

    Hi,

    There is an intentional limitation for the results counter to perserve some performance, but it can be lifted programmatically. Basically, you have set to show 8 results at the time, and the results counter will display at most 10x the limit of that minus the results already displayed, therefore it is 80-8 = 72.

    There are two ways you can resolve this:
    1. To hide the counter via custom CSS:

    a.asp_showmore span {
        display: none;
    }

    2. By lifting the limit for the counter via a small custom code snippet. For that, try adding this code to the functions.php file in your theme/child theme directory – make sure to have a full server back-up first for safety. For more details you can check the safe coding guidelines.

    add_filter( 'asp_query_args', 'asp_change_remaining_limit_mod', 10, 2 );
    function asp_change_remaining_limit_mod( $args, $id ) { 
      $args['_remaining_limit_mod'] = 9999999;
      return $args;
    }

    Let me know if you need help with any of these.

    Best,
    Ernest Marcinko

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


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

You must be logged in to reply to this topic.