• Resolved Geet Jacobs

    (@geetjacobs)


    Love your slideshow script!

    I wanted a random order of slides and thought I would share how to do that for anyone else here.

    To get it to display in a random order add this “‘orderby’ => rand” to the below query.

    meteor-slideshow.php
    code line : 9
    $loop = new WP_Query( array( ‘post_type’ => ‘slide’, ‘slideshow’ => $slideshow, ‘posts_per_page’ => $options[‘slideshow_quantity’],’orderby’ => rand ) ); ?>

    Maybe you might consider adding this feature as default?
    Here are other order options instead of random. Maybe none could be the default? then a drop down on the options page to pick from the below?
    date
    title
    modified
    ID
    rand
    none

    Again thanks for the great plugin!

Viewing 3 replies - 1 through 3 (of 3 total)
  • Plugin Author Josh Leuze

    (@jleuze)

    Hi, thanks for trying my plugin, glad you like it!

    You can set the slides to display randomly through a jQuery option using metadata. Check out the last two code samples in the documentation on using metadata.

    I’m trying to come up with an easy way for user to control the order of the slides aside from changing the publish date. Hopefully this would allow them to sort the slides any way they need to.

    But by all means hack away! I’d suggest making a copy of the loop file, meteor-slideshow.php, in your theme and adding a new template tag to your theme’s function file to load the custom loop. This way your hacks are stored safely away and you can continue to update Meteor Slides in the future.

    Thread Starter Geet Jacobs

    (@geetjacobs)

    Oops!

    Not sure how I missed that meta option for random..

    Reset your plugin code to the original and using meta as I should have before!

    Thank you.

    Plugin Author Josh Leuze

    (@jleuze)

    No problem at all!

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘[Plugin: Meteor Slides] Make slideshow have a random order.’ is closed to new replies.