• Resolved mizugmbh

    (@mizugmbh)


    LightSlider does not load, so instead of a slider, it just shows a normal <ul> with all pictures as elements.

    What I did: Updated to latest WP. Enabled Image Optimization to Webp (shown through htaccess changes, so shouldn’t be the reason for this, as the html code didn’t change). But still not sure what caused this.

    jQuery.Deferred exception: jQuery(…).lightSlider is not a function TypeError: jQuery(…).lightSlider is not a function
    at HTMLDocument. (data:text/javascript;base64,...:8:47)
    at e (https://.../wp-includes/js/jquery/jquery.min.js?ver=3.7.1:2:27028)
    at t (https://.../wp-includes/js/jquery/jquery.min.js?ver=3.7.1:2:27330)

    Uncaught TypeError: jQuery(…).lightSlider is not a function
    at HTMLDocument.
    • This topic was modified 1 week, 5 days ago by mizugmbh.

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

Viewing 3 replies - 1 through 3 (of 3 total)
  • Thread Starter mizugmbh

    (@mizugmbh)

    lightlisder.js and .css weren’t loading by default, had to add them in functions.php

    Thread Starter mizugmbh

    (@mizugmbh)

    function force_load_gwts_slider_assets() {
    // 1. Correct paths based on actual plugin folder name
    $js_url = plugins_url( 'gallery-with-thumbnail-slider/includes/js/lightslider.js' );
    $css_url = plugins_url( 'gallery-with-thumbnail-slider/includes/css/lightslider.css' );
    // 2. Load the CSS file so images stay in their proper positions
    wp_enqueue_style( 'gwts-lightslider-css-forced', $css_url, array(), null );
    
    // 3. Load the JavaScript slider engine file dependent on jQuery
    wp_enqueue_script( 'gwts-lightslider-js-forced', $js_url, array( 'jquery' ), null, true );
    }
    add_action( 'wp_enqueue_scripts', 'force_load_gwts_slider_assets', 99 );
    Plugin Author Galaxy Weblinks

    (@galaxyweblinks)

    @mizugmbh — This is resolved.

    Thank you

Viewing 3 replies - 1 through 3 (of 3 total)

You must be logged in to reply to this topic.