• As your plugin seems to use OwlCarousel, I’m trying to use an autowidth option on it, like this in functions.php :

    add_action("init", function () {
        remove_shortcode("slide-anything", 'slide_anything_shortcode');
        add_shortcode("slide-anything", 'slide_anything_shortcode2');
    });
    
    function slide_anything_shortcode2($atts) {....
    // roughly the same code except this :
    
    $output .= "            autoWidth : true,\n";
    $output .= "            smartSpeed : ".esc_attr($slide_data['slide_transition']).",\n";
    
    

    I have 3 sliders in one page, but only the last is displayed.

    The others have width:0, I think the issue is here, but don’t understand why ?

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

    (@simonpedge)

    You are going to run into problems trying to get ‘Auto Width’ to work with Slide Anything. SA has been developed to be a responsive carousel, i.e you may set it up to display 4 slides on desktop, 3 on tablet, and 2 on mobile.

    If you use Owl Carousel’s ‘Auto Width’ feature, you cannot use these responsive settings. If you try to modify the front-end code (slide-anything-frontend.php), you will need to remove all reference to these responsive settings – so you will need to search for all references of ‘items_width’, and comment out or place this code.

    Thread Starter freuxdesbois

    (@freuxdesbois)

    Thanks for the answer, you’re right, when I use autowidth (now it works, but i can’t figure why, maybe cache issue ?) , the responsive part is broken. But I just wanted an infinite slider with lightbox capabilities, and your plugin was perfect for that ??

    (PS : I didn’t touch your php file, just overrided the function slide_anything_shortcode)

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Autowidth of slides’ is closed to new replies.