WordPress.org

Forums

NextGEN Gallery
[resolved] Source: random image from one gallery (3 posts)

  1. Nora McDougall
    Member
    Posted 1 year ago #

    It's great to see all the new shortcodes available for NextGen! Marvelous work. Of course, the better it gets the more we all want. I am no exception. Is there a way to take one random image from a particular album or gallery?

    Thanks!!!

    https://wordpress.org/plugins/nextgen-gallery/

  2. photocrati
    Member
    Plugin Author

    Posted 1 year ago #

    [ngg_images gallery_ids="1" order_by="rand()" images_per_page=1 disable_pagination=true display_type="photocrati-nextgen_basic_thumbnails"]

    This should choose a random image from the specific gallery (as well as randomizing the gallery sort order) and display it in the page/post. This will also display a [Show Slideshow] link which will lead to a randomly sorted Slideshow. Click on the [Show Thumbnails] link will show a random image.

    Give it a try and see what you think ... it will also give you a base to work from. Please note, immediately refreshing the page may not change the "random" image but following the "show" links will. This is mostly due to the built in caching of the gallery being displayed.

    - Cais.

  3. Nora McDougall
    Member
    Posted 1 year ago #

    Thanks a bunch for your reply!!! I'm hoping to give that a try tomorrow. I will let you know how it works.

Topic Closed

This topic has been closed to new replies.

About this Plugin

  • NextGEN Gallery
  • Frequently Asked Questions
  • Support Threads
  • Reviews

About this Topic

Tags