• Resolved sarahl789

    (@sarahl789)


    Hi, I have set up a website and added a slider to the homepage using Soliloquy Lite. There is a slight delay in the slider loading so I would like to move the main plugin js file into the head section to try to speed this up.

    Where the js file is loaded in shortcode.php I have changed the $in_footer parameter from true to false in the following function:

    // Register main slider script.
    wp_register_script( $this->base->plugin_slug . ‘-script’, plugins_url( ‘assets/js/min/soliloquy-min.js’, $this->base->file ), array( ‘jquery’ ), $this->base->version, false );

    However, after changing this the /wp-content/plugins/soliloquy-lite/assets/js/min/soliloquy-min.js javascript file is still being loaded in the same place near the bottom of the tag.

    Why is the $in_footer parameter not taking effect?

    Or is there another way to speed up the loading of the slider?

    Thank you.
    Sarah

Viewing 1 replies (of 1 total)
  • Hi Sarah ??

    We never recommend making any changes to the core plugin files because when you update the plugin, you’re changes would be lost.

    If you need assistance with speeding up the site, you can do things like adding expires headers, removing query strings from static resources, optimizing your images and even using cropped images as well.

    You can take a look at our helpful hints here: https://soliloquywp.com/docs/how-to-optimize-your-website-and-images-for-speed/

    If you would like any more assistance, please feel free to reach out to our support as well! ?? Just click the Have Basic Question and let us know you’re running the Lite version.

    Thanks

Viewing 1 replies (of 1 total)
  • The topic ‘Speed up slider – load JavaScript in the head?’ is closed to new replies.