Created a new page with JS. Combine JS is enabled, either site or new page works
-
?I am using siteground plugin as my site is hosted there. so to speed up the website i use their tools.
When I use combine java script, the filter button in my website works fine.. That was the case before yesterday, and everything was working fine in my website for past 6 months.. Yesterday i made a new page on my website dazzlesjewellery.in/know-your-body-shape/ . code is in js, css and html. For the js to work, site ground executive suggested me to turn off the combine java script function from siteground plugin. I did that.. the newly created page is working but filter section in my website is not working. I can give you the newly written js code and you please put that in exclusion from combine java script..On my laptop – home page is working fine.. on entering in any subcategory, filters and sorting options are working fine.. once i open “know your body shape page” – its Javascript code is not working” . The alignment in the drop down menu on the know your body shape page changes from left to center
on mobile device everything works the same way.. as soon as i open know your body shape page, java script is not working ..and the menu burger icon stops to respond
When i spoke to siteground. Here is what they suggested – “You can exclude url or url that contain specific query param using the following filters:
And the code for it is :
add_filter( 'sgo_html_minify_exclude_params', 'html_minify_exclude_params' ); function html_minify_exclude_params( $exclude_params ) { // Add the query params that you want to exclude. $exclude_params[] = 'test'; return $exclude_params; } add_filter( 'sgo_html_minify_exclude_urls', 'html_minify_exclude' ); function html_minify_exclude( $exclude_urls ) { // Add the url that you want to exclude. $exclude_urls[] = 'https://mydomain.com/page-slug'; return $exclude_urls; }
This will need to be included in the functions.php file of your theme
You will just need to change
$exclude_urls[] = 'https://mydomain.com/page-slug'; with the $exclude_urls[] = 'https://dazzlesjewellery.in/know-your-body-shape/
as that is the url you want to exclude???My ciyatheme people don’t help me with this, saying that the whole problem is with siteground and i agree. I use sg optimizer to speed up my site and hence the combine java script, render, defer etc.. and the problem airses..
?????
- This topic was modified 3 years, 5 months ago by .
- This topic was modified 3 years, 5 months ago by .
The page I need help with: [log in to see the link]
- The topic ‘Created a new page with JS. Combine JS is enabled, either site or new page works’ is closed to new replies.