*SOLVED* Store locator JS loads slow & on every single page.
Hey,
Is it possible that the plugin will not load on every single page, but only on the page where it gets used. I tried to use the wordpress function "wp_deregister_script", but it didn't work with your plugin. I bought the plugin and would be really pleased if you have a solution for my problem, because this script needs the longest loading time of all the scripts on my website.
I don't think you fixed that issue in one of the newer versions, but after I updated the plugin and it didn't work, I installed the older version again and didn't update it anymore.
Thanks
Replies (4)
RE: Store locator JS loads slow & on every single page.
-
Added by Cory Kemp 3 months ago
I'd like to second this request. The script is a bit of a hog on pages where I don't need to call it.
Thanks.
RE: Store locator JS loads slow & on every single page.
-
Added by max sag 3 months ago
push
Has somebody an Idea how to solve that problem?
RE: Store locator JS loads slow & on every single page. SOLVED
-
Added by max sag 3 months ago
I got it solved:
In the /core/ plugin folder edit functions.sl.php
Line 487 replace:if (isset($slplus_plugin) && $slplus_plugin->ok_to_show()) {
with:if (is_page(33)) {
33 is the ID of the post you want to load the scripts.
RE: *SOLVED* Store locator JS loads slow & on every single page.
-
Added by Lance Cleveland about 1 month ago
v2.6 will only load the JS & CSS on pages where the shortcodes appear.
It also avoids a lot of the DB I/O overhead of the prior releases when loading the scripts.
(1-4/4)