WordPress.org

Ready to get started?Download WordPress

Forums

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

  1. Golok
    Member
    Posted 7 months 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. sumobi
    Member
    Plugin Author

    Posted 7 months 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

Reply

You must log in to post.

About this Plugin

About this Topic

Tags