WordPress.org

Ready to get started?Download WordPress

Forums

AnythingSlider for WordPress
Autoplay for specific sliders via shortcode param does not wo (2 posts)

  1. alex1982
    Member
    Posted 1 year ago #

    Hey there,
    I am using the plugin version 0.6.8 and it works fine so far but I wanted to have sliders, which autoplay and sliders which don't. So I tried to put "autoPlay=true" into the shortcode like this:
    [anything_slides cat=philosophie-slider width=994 height=436 delay=2000 resume=5000 animation=750 autoPlay=true order=ASC orderby=menu_order theme=mycustomthemename]
    but this does not work, probably because WordPress lowers all param strings from the shortcode.

    To get this to work, you have to change line 261 in file jtd-anything-slider.php from

    $autoPlay        = ( isset( $attr['autoPlay'] ) )           ? $attr['autoPlay']             : ( ( $options['autoPlay'] )     ? $options['autoPlay']          : 'true');

    to

    $autoPlay        = ( isset( $attr['autoplay'] ) )           ? $attr['autoplay']             : ( ( $options['autoPlay'] )     ? $options['autoPlay']          : 'true');
    .
    I don't like to edit plugins due to removing all code changes on update, so if someone knows a better way to solve this I'd like to see it in here :-)!

    http://wordpress.org/extend/plugins/anythingslider-for-wordpress/

  2. ChemaZ
    Member
    Posted 1 year ago #

    You did the right thing, reporting it here. The maintainers will surely incorporate your fix... eventually (with autoPlay and any other attributes with a capital letter).

    This was bugging me, but you saved me all the debugging, thanks!

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic