• Resolved agreda

    (@agreda)


    Forgive me if this has been answered, but I have searched and tried various methods to accomplish this…

    Is there a way to show a single random image from a specific gallery? When inserting a gallery, there is no Random sort option. And I see no Random sort parameter defined for the shortcodes. The only Random option appears to be for inserting random thumbnails or singlepic from all galleries.

    @photocrati Is it possible to display one random image at full size, from a specific gallery with 60+ images? If so, any direction is greatly appreciated, otherwise, please consider this a feature request.

    Thank you!

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

Viewing 3 replies - 1 through 3 (of 3 total)
  • Plugin Contributor photocrati

    (@photocrati)

    @agreda – You will have to use a shortcode to accomplish this (or at least what I am understanding your description of the display). Try something along these lines:

    [ngg_images gallery_ids=1 display_type=photocrati-nextgen_basic_thumbnails disable_pagination=1 override_thumbnail_settings=1 thumbnail_width=600 thumbnail_height=400 order_by='rand()' show_slideshow_link=0 images_per_page=1 show_all_in_lightbox=1]

    It’s a little involved but it does work on my test server.

    – Cais.

    Thread Starter agreda

    (@agreda)

    @photocrati Thank you! That does work. That “order_by” parameter is just nowhere to be found on the Shortcodes page.

    Unfortunately, I now need to troubleshoot an apparent conflict with the Simple:Press plugin that is preventing the shortcode from rendering, even though I have opted not to filter codes… :-\

    Presuming I can get that resolved, I have one question/issue with the code you provided. The image that gets displayed is not responsive. It does not size to fit the window/element width. Instead of resizing, the image gets cropped when the window is resized. Is this expected behavior?

    EDIT: Never mind! When inserting nextgen_basic_singlepic (instead of thumbnails) the random image resizes with the window.

    Thanks again!

    Plugin Contributor photocrati

    (@photocrati)

    @agreda – Glad to see if work out for you. The shortcode I provided would likely need some custom CSS to force it to be “responsive” within the theme’s content area … although I haven’t tested it that deeply.

    – Cais.

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘How To Randomize Single Gallery’ is closed to new replies.