Title: Override Method
Last modified: June 21, 2021

---

# Override Method

 *  [RezaY](https://wordpress.org/support/users/mohammad983/)
 * (@mohammad983)
 * [4 years, 10 months ago](https://wordpress.org/support/topic/override-method/)
 * I have a category that has 20K posts.
    When I just checked the category on the
   filter box and hit search. the plugin shows the 10 latest posts from the category
   so fast but when I click to see all result posts, the result page takes about
   5 min to completely load! I mean it takes 5min to show 20K posts(10 posts per
   page). Is there any way to increase speed?!
 * by the way, I use Override Method the search result page load too slowly!
    on
   the other hand when I disable it, the result page load so fast but it seems category
   filter not work course the result page contain all the website posts!

Viewing 3 replies - 1 through 3 (of 3 total)

 *  Plugin Author [wpdreams](https://wordpress.org/support/users/wpdreams/)
 * (@wpdreams)
 * [4 years, 10 months ago](https://wordpress.org/support/topic/override-method/#post-14586444)
 * Hi!
 * The issue is probably the filter itself – it can be a tough operation, especially
   having tens of thousands of posts. It needs to run a subquery to match all the
   items within the selected category, as well as do exclusions when neccessary.
 * Maybe I can suggest a custom code to lower the results page override limit. Hopefully
   it should make the query much faster.
 * 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](https://knowledgebase.ajaxsearchpro.com/safe-coding-guideline).
 *     ```
       add_filter( 'asl_query_args', 'asl_change_override_limit', 10, 1 );
       function asl_change_override_limit( $args ) {
       	$args['posts_limit_override'] = 50;
       	return $args;
       }
       ```
   
 * This limits the maximum number of pages on the results page to 5 from the initial
   100.
 * Best,
    Ernest M.
 *  Thread Starter [RezaY](https://wordpress.org/support/users/mohammad983/)
 * (@mohammad983)
 * [4 years, 10 months ago](https://wordpress.org/support/topic/override-method/#post-14586909)
 * thanks for your replay
    Unfortunately, it does not work!
 * By the way, I want to show all posts which I filtered. I mean I don’t want to
   decrease the page result number.
 *  Plugin Author [wpdreams](https://wordpress.org/support/users/wpdreams/)
 * (@wpdreams)
 * [4 years, 10 months ago](https://wordpress.org/support/topic/override-method/#post-14587462)
 * I’m afraid the only way is not using the filters then, the query is probably 
   too much for the server to handle.
 * Best,
    Ernest M.

Viewing 3 replies - 1 through 3 (of 3 total)

The topic ‘Override Method’ is closed to new replies.

 * ![](https://ps.w.org/ajax-search-lite/assets/icon-256x256.png?rev=3192672)
 * [Ajax Search Lite - Live Search & Filter](https://wordpress.org/plugins/ajax-search-lite/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/ajax-search-lite/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/ajax-search-lite/)
 * [Active Topics](https://wordpress.org/support/plugin/ajax-search-lite/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/ajax-search-lite/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/ajax-search-lite/reviews/)

 * 3 replies
 * 2 participants
 * Last reply from: [wpdreams](https://wordpress.org/support/users/wpdreams/)
 * Last activity: [4 years, 10 months ago](https://wordpress.org/support/topic/override-method/#post-14587462)
 * Status: not resolved