Home Forums General Issues Slider stops working


Slider stops working

  • I am trying to fill up a slider with images from the wordpress plugin Advanced Custom Fields. By default the slider works perfect (hard coded images) as you can see in the footer here Whenever I replace the hard coded images with images obtained from the Advanced Custom Fields (as seen in the footer here the slider stops working. The images are being displayed but the slider does not run, while everything looks exactly the same for me.

    Can the problem be found in the way the slider loads? The slider loads with the following code:

        $( window ).load(function() {
    var $c = $('#carousel'),
        $w = $(window);
        align: false,
        items: 10,
        scroll: {
            items: 1,
            duration: 3000,
            timeoutDuration: 0,
            easing: 'linear',
            pauseOnHover: 'immediate'
  • Hi @projectarthouse,

    Thanks for the post.

    Your loading script looks correct, the issue might be arising from how you are getting the ACF data. Have you been able to debug your variables to check if the expected image data is being returned?

    To debug, you would need something like this:

    $image = get_field('image_field_name');
    echo '<pre>';
    	var_dump( $image );
    echo '</pre>';
Viewing 2 posts - 1 through 2 (of 2 total)

The topic ‘Slider stops working’ is closed to new replies.