WordPress.org

Ready to get started?Download WordPress

Forums

Meteor Slides
[resolved] Different max number of slides for individual slideshows (9 posts)

  1. mubel
    Member
    Posted 1 year ago #

    Hi!

    First of all, great plugin! Thanks for that!

    I have searched around though for a solution to have different max number of slides in individual slideshows and not found any yet.

    I know I can have different number of slides in different slideshows and that I can set a global max number for all of them.

    The thing is though, that I want to have a slideshow on the start page with max 3 slides, and then a slideshow on the gallery page with an infinite number of slides. This is not possible as far as I know since the global max has to be equal to the highest number of slides in any of the slideshows.

    Is there any way to set individual max number of slides? If not, do you plan/intend to implement this feature?

    Thanks in advance!

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

  2. mubel
    Member
    Posted 1 year ago #

    Bump!

    Anyone know anything about this?

  3. Josh Leuze
    Member
    Plugin Author

    Posted 1 year ago #

    Typically when I need two slideshows setup like this, I will set the quantity to match the larger slideshow and just add less slides to the smaller slideshow, is it not possible to only add 3 slides to the home slideshow?

  4. mubel
    Member
    Posted 1 year ago #

    Hi! Thanks for response!

    If it was my own site I could do what you say.

    The thing is that I'm making a site for a customer, and they will constantly add new slides to the gallery and also sometimes add new feature slides to the front page, but the front page should only show 3 in total.

    To make it easy for them to manage, I wanted to limit the slideshow on the front page to only show the latest 3 slides even if they add a forth or more (as the max setting currently do, but for all slideshows). This way they won't have to either change or delete the current 3 ones, as they will "pop out" from being viewed on the front page.

    Of course it's doable to instruct them to always delete the oldest one when they add a new, but this is something I as a developer would like to solve for them, so they won't have to make potential "errors" just because I couldn't create a good solution.

    Is it not possible to maybe set "max-slides" as meta value or something, as it is with size and other variables?

  5. Josh Leuze
    Member
    Plugin Author

    Posted 1 year ago #

    Sorry for the delayed response. If you only need the slideshow on the homepage to have a lower max quantity, you can easily do this with a conditional in a custom slideshow template, like this:

    if is_front_page() {
    	$slideshow_quantity = 3;
    } else {
    	$slideshow_quantity = $slideshow;
    }
    $meteor_loop     = new WP_Query( array(
    
    	'post_type'      => 'slide',
    	'slideshow'      => $slideshow_quantity,
    	'posts_per_page' => $meteor_options['slideshow_quantity']
    
    ) );
  6. mubel
    Member
    Posted 1 year ago #

    Better late then never! :)

    Thanks a lot! Keep up the good work!

  7. Josh Leuze
    Member
    Plugin Author

    Posted 1 year ago #

    No problem!

  8. mubel
    Member
    Posted 1 year ago #

    Small correction though, after short trial & error (if anyone else wants to use this):

    if (is_front_page()) {
    	$meteor_options['slideshow_quantity'] = 3;
    } else {
    	$meteor_options['slideshow_quantity'] = $slideshow;
    }
    $meteor_loop     = new WP_Query( array(
    
    	'post_type'      => 'slide',
    	'slideshow'      => $slideshow,
    	'posts_per_page' => $meteor_options['slideshow_quantity']
    
    ) );

    Working now so thanks again! :)

  9. mubel
    Member
    Posted 1 year ago #

    Simpler even:

    if (is_front_page()) {
    	$meteor_options['slideshow_quantity'] = 3;
    }
    $meteor_loop     = new WP_Query( array(
    
    	'post_type'      => 'slide',
    	'slideshow'      => $slideshow,
    	'posts_per_page' => $meteor_options['slideshow_quantity']
    
    ) );

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic

Tags

No tags yet.