WordPress.org

Ready to get started?Download WordPress

Forums

Meteor Slides
[resolved] Random order with lot of images (7 posts)

  1. Q41developer
    Member
    Posted 10 months ago #

    Great plug-in!
    Just one thing to be perfect.
    I want to do a ramdon order of the images, but I´ve got more than 80 and each time just loads the same last 10 images.
    Is it posible to do this?
    Thank you very much

    http://wordpress.org/plugins/meteor-slides/

  2. Josh Leuze
    Member
    Plugin Author

    Posted 10 months ago #

    The trick with that is that when you set it to random in the metadata, it randomizes that slides that are already loaded with JavaScript. To randomly load the slides into the slideshow, you have to use a custom slideshow template and edit the slides query and set the orderby to rand:
    http://codex.wordpress.org/Class_Reference/WP_Query#Order_.26_Orderby_Parameters

  3. Q41developer
    Member
    Posted 9 months ago #

    Thanks Josh,
    I already have custom slideshow template on my theme, but I don´t know where do I have to place the code. I tried to do this:

    $meteor_loop     = new WP_Query( array(
    
    		'post_type'      => 'slide',
    		'slideshow'      => $slideshow,
    		'posts_per_page' => $meteor_options['slideshow_quantity']
    		'orderby' => 'rand'
    
    	) );

    but the slide is not showing at all

  4. Q41developer
    Member
    Posted 9 months ago #

    Can anybody help me with this please?

  5. Q41developer
    Member
    Posted 9 months ago #

    I just resolved. I forgot one coma. The correct code is:

    $meteor_loop     = new WP_Query( array(
    
    		'post_type'      => 'slide',
    		'slideshow'      => $slideshow,
    		'posts_per_page' => $meteor_options['slideshow_quantity'],
    		'orderby' 		 => 'rand'
  6. Josh Leuze
    Member
    Plugin Author

    Posted 8 months ago #

    Sorry for the delay, glad to hear you got it working!

  7. Q41developer
    Member
    Posted 8 months ago #

    Thanks very much Josh

Reply

You must log in to post.

About this Plugin

About this Topic