- This topic has 4 replies, 2 voices, and was last updated 13 years, 4 months ago by .
Viewing 5 posts - 1 through 5 (of 5 total)
Viewing 5 posts - 1 through 5 (of 5 total)
- You must be logged in to reply to this topic.
Support site for Tips and Tricks HQ premium products
by
Tips and Tricks HQ Support Portal › Forums › WP eStore Forum › Disable WP eStore on specific pages
In order to avoid loading scripts I don´t need I want to disable the eStore plugin on specific pages where I don´t need it. How is that possible?
You can’t disable loading of eStore on specific pages. The proper way to optimize the script loading time is to combine all scripts on the page (there are plugins that can do these for you). These posts have more details:
Speed suggestion – Combine all the javascript files in the plugin
https://support.tipsandtricks-hq.com/forums/topic/stop-unnecessary-js-and-css-files-from-loading
In fact it´s not because of the loading time. It´s because of conflicts with simple Press forum plugin on this site http://www.der-prinz.com/support-forum
You can see that there are some JS errors coming from eStore. Any idea?
What does the JS error say? I couldn’t load that page for some reason when I go to the above URL you mentioned it just loads forever.
Now to answer your original question… you can do the following to tell eStore to not load the JQuery libraries on a particular page. The following function in “wp_eStore.php” file loads the JQuery libraries in eStore:
wp_eStore_load_libraries
You could theoretically add code like the following in that function to stop eStore from loading the jquery libraries if it is a particular URL:
if(digi_cart_current_page_url()=="http://www.der-prinz.com/support-forum")
{
//do not load the libraries on this page
return;
}
This code will need to be the first thing inside this function.
That worked. Thanks.