Viewing 7 posts - 1 through 7 (of 7 total)
  • Author
  • #24576

    I’ve got the default image background gallery set up. However, I want it NOT to autorotate. Instead, I’d love to get the theme to cycle through each one of those images randomly at every page load. A commenter from the Themeforest page for Flashlight said there wasn’t an option for this, but I was hoping to get guidance on which files I could edit and how to get the behavior I want.





    Hi yaktails,

    You could try modifying the includes>helper-slideshow.php file or possibly the js>avia_fullscreen_slider.js file. I’m not sure on the specifics because of the way the background slider gets loaded in.




    I’ve been trying to use array_rand on the various arrays that I see in file includes>helper-slideshow.php but no joy. Any ideas how I can make this work?



    open up includes/helper-slideshow.php and replace:

    $attachments = avia_post_meta($this->post_id, 'slideshow');


    $attachments = avia_post_meta($this->post_id, 'slideshow');
    if(is_array($attachments)) shuffle($attachments);

    Best regards,



    Doing that throws this error:

    Warning: : shuffle() expects parameter 1 to be array, boolean given in /home/bbuildin/public_html/wp-content/themes/flashlight/includes/helper-slideshow.php on line 152



    I changed the code a bit – it should work now.



Viewing 7 posts - 1 through 7 (of 7 total)

The topic ‘How to randomly cycle through image background’ is closed to new replies.