Support » Plugin: WordPress Gallery Plugin - NextGEN Gallery » nggDisplayRandomImages doesn't work in NextGen Gallery 2.0

Viewing 9 replies - 1 through 9 (of 9 total)
  • This seems to work:

    <?php
    $example = new C_Widget();
    $example->echo_widget_random(4,100,100,”,”,’thumbnail’);
    ?>

    Sher

    (@mjansherkhan)

    Hi!

    I am facing the same problem

    This code

    <?php
    $Width = '145px';
    $Height = '100px';
    if (function_exists("nggDisplayRandomImages"))
    { nggDisplayRandomImages('8',$Width,$Height); }
    ?>

    is not working anymore . Can please anyone tell the exact code which I should replace

    Thanks.

    @ w.bear : Thanks mate. Your code saved me ! 🙂

    Cheers!

    @sher

    This should work:

    <?php
    $Width = ‘145px’;
    $Height = ‘100px’;
    if (class_exists(“C_Widget”))
    {
    $example = new C_Widget();
    $example->echo_widget_random(‘8’,$Width,$Height);
    }
    ?>

    Sher

    (@mjansherkhan)

    @w.bear: Thank you very much. Your code saved me too!

    Plugin Author photocrati

    (@photocrati)

    @w.bear: Thanks very much for jumping to offer a solution. Much appreciated.

    The first solution above provided by @w.bear worked great for my hacked page template too. Thank you!

    I was also able to get recent/random galleries back on other pages using the new shortcodes, defined at… http://www.nextgen-gallery.com/nextgen-gallery-shortcodes/

    I agree, @w.bear code worked for me also. I am using it to show thumbs from specific categories so this worked for me:

    $example = new C_Widget();
    $example->echo_widget_random(6,130,85,'allow','7','thumbnail');

    Hello All,

    I have been using the code above but I noticed that the random images are not pulling by random. I have over 8000 photos in my nextgen library.

    http://maronesj.com/random-photo-generator/

    Reload the page and you’ll notice it will pull the same photos over and over.

    here is my shortcode.

    $example = new C_Widget();
    $example->echo_widget_random(20,150,150,'','','thumbnail');

    Any ideas?

Viewing 9 replies - 1 through 9 (of 9 total)
  • The topic ‘nggDisplayRandomImages doesn't work in NextGen Gallery 2.0’ is closed to new replies.