Results limit

This topic contains 9 replies, has 2 voices, and was last updated by

 
Keymaster
1 year, 2 months ago.

Viewing 10 posts - 1 through 10 (of 10 total)
  • Author
    Posts
  • #30154

    Participant

    hi there
    I’ve just started using your plugin so I have no site live just yet but wondered if you could help.

    I am searching user profiles, and there seems to be a limit on how many users are being displayed in the results.

    If I changethe limit, the results increase 3 fold. eg if the limit is 10, then i can iterate (load more) through the results 3 times until i get 30 results. if i increase the limit to 20, i can iterate through results 3 times to then get 60 results.

    Am I missing a settin somewhere where I can display ALL my results, and not limit the load more function to 3 times only?

    Many thanks

    #30155

    Hi,

    Currently it is programmatically limitet to the 3 folds of the current limit, as you noticed. With the custom post types search this is increased to 10 fold. It is due to performance and a few other reasons.

    The only way to increase it currently is by making direct changes to the core plugin code. There is a query argument added that will work in the future releases via a custom code, but not with the current one unfortunately. However I can suggest a modification and a custom code, that will increase this limit (to infinite), patches the current version, and will work in the future one as well:

    1. Make sure to have a full site back-up just in case
    2. Open up the wp-content/plugins/ajax-search-pro/includes/classes/search/class-asp-search-users.php file on your server
    3. Replace it’s contents with this
    4. Save the file

    Now, a few lines of custom code is also needed. Try adding this custom code to the functions.php in your theme/child theme directory. Before editing, please make sure to have a full site back-up just in case!

    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;
    }

    With these changes, the limit should be lifted. Just make sure to keep the custom code above in your functions.php file, and it will be fine in the upcoming updates as well.

    Best,
    Ernest Marcinko

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


    #30157

    Participant

    Thanks for getting back to me quickly, however I have tried the code and am now getting the message:

    ‘The request failed. Please check your connection! Status 500’

    #30159

    I re-tested the code, but it seems to be all right. Can you please add temporary FTP and back-end access? I will try to make the changes directly. Thank you!

    Best,
    Ernest Marcinko

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


    #30168

    Participant
    You cannot access this content.
    #30169

    Thank you!

    I tried to delete and re-install the plugin to make sure the files are consistent, but it does not let me upload via the plugin manager: https://i.imgur.com/PRZ7Twt.png
    Can you please re-install and activte the plugin? All the settings will remain in tact.

    Best,
    Ernest Marcinko

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


    #30171

    Participant
    You cannot access this content.
    #30172

    Thank you very much. It should be okay now. There was an additional line in the original code that is not yet supported in the current release, it caused the issue. This change will be permanent in the upcoming release, so all you need to keep is the custom code in the theme functions.php file.

    Best,
    Ernest Marcinko

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


    #30173

    Participant
    You cannot access this content.
    #30174
    You cannot access this content. Best,
    Ernest Marcinko

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


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

You must be logged in to reply to this topic.