Home › Forums › Product Support Forums › Ajax Search Pro for WordPress Support › Preload search results
This topic contains 10 replies, has 2 voices, and was last updated by Steven Maas 5 years, 9 months ago.
- AuthorPosts
- February 17, 2018 at 1:21 am #16823
I was wondering if there are any additional tweaks that I can do to speed up search. For instance I have a search right now that looks at the brokers post type and only have 1 broker. When typing it take a sec or so to show. I was playing around with your settings and noticed that you have
Layout Options > Auto Populate > Display results by default when the page loads (auto populate). I like the idea of populating the search when page loads just not seeing the results until user types. Or start loading search items on field focus in the back ground.Let me know if there is anything else I could do to speed up.
Thanks!
February 17, 2018 at 9:42 am #16824Hi!
I believe you are looking for this: Documentation – Fine tuning the search configuration
There are a few methods, especially in section 1 and 2, that may further improve the performance.Pre-loading results is not yet possible. There will be a separate interface within the next 3-4 major releases to allow instant search on certain conditions.
Best,
Ernest Marcinko
If you like my products, don't forget to rate them on codecanyon :)
February 17, 2018 at 10:12 am #16826Thanks for the tips.
I notice that the jquery.ajaxsearchpro.min.js loads on all pages. I’m only loading the ajax search pro on one page on my site.
How can you just load the jquery.ajaxsearchpro.min.js for just the pages which are using the ajax search pro?
Thanks!
-Steve
February 17, 2018 at 11:01 am #16827Hi Steve,
That might be a bit difficult, as in WordPress not ever page has an ID (archives, front etc..). It is however possible to de-register them via a custom code.
I have put together a small custom snippet, which may cover most use cases. Add this custom code to the functions.php in your theme/child theme directory (copy from line 3 only!). Before editing, please make sure to have a full site back-up just in case!Change the $allowed_pages variable to the array of page IDs where you need the search scripts, as well as the $allowed_on_home variable, if the search script should be allowed on the home page.
Best,
Ernest Marcinko
If you like my products, don't forget to rate them on codecanyon :)
February 17, 2018 at 8:21 pm #16830Hi Ernest:
That code works. I would be nice to have check box option to include ajax js globally. If unchecked it would only load on the specific page. That’s how some my other plugins work.
Thanks!
-Steve
February 18, 2018 at 5:35 pm #16834Hi Steve,
I will definitely consider adding a feature to the compatibility options menu to enabled/disable the plugin on some front-end pages.
Best,
Ernest Marcinko
If you like my products, don't forget to rate them on codecanyon :)
February 18, 2018 at 5:56 pm #16835Hi Ernest,
Thanks for your reply. I did notice that the plugin also places the Ajax Pro css files on all the pages. Is there a way to remove the css from loading on all pages?
<link rel=’stylesheet’ id=’wpdreams-asp-basic-css’ href=’//www.fieldslre.com/wp-content/plugins/ajax-search-pro/css/style.basic.css?ver=zeXszJ’ type=’text/css’ media=’all’ />
<link rel=’stylesheet’ id=’wpdreams-asp-chosen-css’ href=’//www.fieldslre.com/wp-content/plugins/ajax-search-pro/css/chosen/chosen.css?ver=zeXszJ’ type=’text/css’ media=’all’ />Thnkas!
-Steve
February 18, 2018 at 6:14 pm #16836Hi!
Sure, this modified version should get rid off those as well:
Best,
Ernest Marcinko
If you like my products, don't forget to rate them on codecanyon :)
February 18, 2018 at 6:35 pm #16837Hi Ernest:
For some the css is still showing up on all pages.
-Steve
February 20, 2018 at 9:58 am #16853Hi!
Indeed, try this one:
Best,
Ernest Marcinko
If you like my products, don't forget to rate them on codecanyon :)
February 20, 2018 at 4:31 pm #16864HI Ernest:
That works! I would highly recommend in a next version to include ajax pro files globally or specific pages.
Thanks again!
-Steve
- AuthorPosts
You must be logged in to reply to this topic.