WordPress.org

Ready to get started?Download WordPress

Forums

WP-Cycle
[resolved] How to change order? (12 posts)

  1. glowbewohner
    Member
    Posted 10 months ago #

    Is there a way to make the images rotate randomly? Currently they rotate according to the order of the uploads

    http://wordpress.org/plugins/wp-cycle/

  2. Gyan Gaurav
    Member
    Posted 10 months ago #

    Hi glowbewohner !!

    give this a try .

    you will have to edit (wp-cycle.php) this file in wp_cycle plugin.

    <script type="text/javascript">
    jQuery(document).ready(function($) {
    	$("#<?php echo $wp_cycle_settings['div']; ?>").cycle({
    	    fx: '<?php echo $wp_cycle_settings['effect']; ?>',
    	    timeout: <?php echo ($wp_cycle_settings['delay'] * 1000); ?>,
    	    speed: <?php echo ($wp_cycle_settings['duration'] * 1000); ?>,
    	    pause: 1,
    	    fit: 1
    	});
    });
    </script>

    find this script in the bottom of the page. add
    random: 1
    below fit: 1

    don't forget to add a (,)comma after fit: 1

    see if it helps .

  3. glowbewohner
    Member
    Posted 9 months ago #

    Hi, i've tried this, but it doesnt work for me :(
    Do i need some changes in the jquery.cycle.all.min ?

  4. Gyan Gaurav
    Member
    Posted 9 months ago #

    normally it works. can you post a link to your site here. ?

  5. glowbewohner
    Member
    Posted 9 months ago #

  6. Gyan Gaurav
    Member
    Posted 9 months ago #

    hi glowbewohner,

    have you added the code random: 1 there. ?

    its not showing up here. can you please write the part of code you modified ?

  7. glowbewohner
    Member
    Posted 9 months ago #

    jeah, i've tried. But i changed it back.

  8. Gyan Gaurav
    Member
    Posted 9 months ago #

    Ok. can you please add it once more. It did work when I tried this.

  9. glowbewohner
    Member
    Posted 9 months ago #

    I think we get it now . THX

  10. Gyan Gaurav
    Member
    Posted 9 months ago #

    Great. please mark the issue resolved.

  11. glowbewohner
    Member
    Posted 9 months ago #

    At first time you write we have to add:
    random: 1
    below fit: 1

    but "below fit: 1" destroyed the result. The correct code is:

    <script type="text/javascript">
    jQuery(document).ready(function($) {
                    $("#<?php echo $wp_cycle_settings['div']; ?>").cycle({
                        fx: '<?php echo $wp_cycle_settings['effect']; ?>',
                        timeout: <?php echo ($wp_cycle_settings['delay'] * 1000); ?>,
                        speed: <?php echo ($wp_cycle_settings['duration'] * 1000); ?>,
                        pause: 1,
                        fit: 1,
                        random: 1
                    });
    });
    </script>
  12. Gyan Gaurav
    Member
    Posted 9 months ago #

    Oh. my bad. I really didn't think about this. actually I have used it on my slides. and in the same way you mentioned. I am really sorry I forgot to notice that sequence.

Reply

You must log in to post.

About this Plugin

About this Topic

Tags

No tags yet.