• Resolved saumiwordpressorg

    (@saumiwordpressorg)


    ?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..

    ?????

    The page I need help with: [log in to see the link]

Viewing 2 replies - 1 through 2 (of 2 total)
  • Plugin Author Stoyan Georgiev

    (@stoyangeorgiev)

    Hey there @saumiwordpressorg,

    We had a look at the website and it looks like there were some js related errors in the console.

    The issue was related to Deffer Render-blocking JS. It was caused by one of the scripts that your website uses being deferred.

    In order to fix this, simply go to Frontend Optimization tab -> Deffer Render-blocking JS and from the drop-down menu add the /wp-includes/js/jquery/ui/core.min.js to the excluded list.

    This will solve the issue with the menu not working on mobile, as well as the js errors in your console. If you however have any issues after that, feel free to contact us.

    Kind regards,
    Stoyan

    Thread Starter saumiwordpressorg

    (@saumiwordpressorg)

    Yes, it works.. thank you so much

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Created a new page with JS. Combine JS is enabled, either site or new page works’ is closed to new replies.