• RezaY

    (@mohammad983)


    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

    (@wpdreams)

    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.

    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

    (@mohammad983)

    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

    (@wpdreams)

    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.