WordPress.org

Ready to get started?Download WordPress

Forums

Header Image Slider
[resolved] Random Starting Slide (2 posts)

  1. parterburn
    Member
    Posted 2 years ago #

    It looks like this is possible with Nivo Slider (http://nivo.dev7studios.com/support/), so I'm hoping there is a way to plug this into the code somehow...could you perhaps help me where to add this into the header-image-slider.php file? Thanks!

    var total = $('#slider img').length;
    var rand = Math.floor(Math.random()*total);
    $('#slider').nivoSlider({
    startSlide:rand
    });

    http://wordpress.org/extend/plugins/header-image-slider/

  2. shazdeh
    Member
    Plugin Author

    Posted 2 years ago #

    In the general-template.php file, find the boom_nivo_slider_options function. This function outputs the slider options.
    Add this after the return statement:
    startSlide: ". rand( 1, boom_count_header_images() ) .",
    I will add an option for this in the next version.

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic