• Resolved schubi63

    (@schubi63)


    Hi folks,

    first: thanks for the great work for MetaSlider.

    I develop a website local on my notebook (XAMPP, Mac). I set my (MetaSlider) slides to display the content randomly. That work’s fine on my local system.

    After exporting the whole website content via the WordPress plugin “WP2Static” (https://wp2static.com/) and moving it to the webspace: the slides work. Except the random function. The images have always the same order.

    Is there anything I can do to fix this?
    Or is it impossible because of how the randomization is implemented?

    Thank you so much for your time and hopefully your help.

    The page I need help with: [log in to see the link]

Viewing 6 replies - 16 through 21 (of 21 total)
  • If you want 1059 to not be randomized then you need to update the check from != (not equals), to == (equals)

    if ($slider_id == '1059') return $options;

    Does that work?

    Thread Starter schubi63

    (@schubi63)

    Now it works! <3

    Merci!!!!!

    Thread Starter schubi63

    (@schubi63)

    If I would have 2 or 3 sliders I would like to exclude? How must the IF condition look like?

    Hi

    Is it possible to have only those randomized, which are set to random in the slide specific settings?

    This will probably work. Can you try it out?

    add_filter('metaslider_flex_slider_parameters', function ($options, $slider_id, $settings) {
        if (isset($settings['random']) && filter_var($settings['random'], FILTER_VALIDATE_BOOLEAN)) {
            $options['randomize'] = 'true';
        }
        return $options;
    }, 10, 3);
    Thread Starter schubi63

    (@schubi63)

    I tried and it works too, it’s what I was looking for!
    I really appreciate your help!

    Great to hear! I’ll go ahead and mark this as resolved.

    ?By the way, if you’re enjoying MetaSlider please leave us a 5-star review. They really help us out and let others find our plugin more easily.
    ?If you don’t think we deserve the 5 stars please let us know how we can improve, too. Thanks!

    https://www.ads-software.com/support/plugin/ml-slider/reviews/?rate=5#new-post

Viewing 6 replies - 16 through 21 (of 21 total)
  • The topic ‘random / randomized order does not work in static html’ is closed to new replies.