WordPress.org

Forums

Easy Image Gallery
[resolved] Random gallery or random image (2 posts)

  1. Golok
    Member
    Posted 1 year ago #

    Thank you for this awesome plugin!

    Is there a way to retrieve randomly a gallery, or better a single image, such as in the sidebar?

    I don't mind to write a custom plugin but I'm not sure about the query.

    In advance thank you for your answer.

    http://wordpress.org/plugins/easy-image-gallery/

  2. Andrew Munro (sumobi)
    Member
    Plugin Author

    Posted 1 year ago #

    Not out of the box but it would be possible to build yourself. To display a random gallery you'll need to modify the easy_image_gallery() function a bit. Find all posts with galleries, store their ids in array and use shuffle() or rand() to mix it up. To display a single image you'll also need to modify the function to pass in an image ID or similar.

    Have a look inside the function I mentioned to see how it's built

Topic Closed

This topic has been closed to new replies.

About this Plugin

  • Easy Image Gallery
  • Frequently Asked Questions
  • Support Threads
  • Reviews

About this Topic

Tags