Title: Query Random Images
Last modified: August 24, 2016

---

# Query Random Images

 *  [Stoplosstm](https://wordpress.org/support/users/stoplosstm/)
 * (@stoplosstm)
 * [10 years, 11 months ago](https://wordpress.org/support/topic/query-random-images/)
 * I’m currently work on a custom theme and it has page banners on various page 
   templates. These banners will show a random image on load. The real question 
   is, what would be the best way for the user to upload the images to a single 
   location in WordPress — where I can query them (only) at random.
 * In essence I was looking for a standard WordPress gallery that isn’t associated
   with a post.

Viewing 1 replies (of 1 total)

 *  [Trey Kane](https://wordpress.org/support/users/treykane/)
 * (@treykane)
 * [10 years, 11 months ago](https://wordpress.org/support/topic/query-random-images/#post-6106262)
 * You could do this as a custom post type, that has an associated featured image.
   That would allow you to query all thumbnails from that post type. Just make sure
   you setup the post type to allow featured images.
 * [https://codex.wordpress.org/Function_Reference/register_post_type](https://codex.wordpress.org/Function_Reference/register_post_type)

Viewing 1 replies (of 1 total)

The topic ‘Query Random Images’ is closed to new replies.

## Tags

 * [gallery](https://wordpress.org/support/topic-tag/gallery/)
 * [images](https://wordpress.org/support/topic-tag/images/)

 * In: [Fixing WordPress](https://wordpress.org/support/forum/how-to-and-troubleshooting/)
 * 1 reply
 * 2 participants
 * Last reply from: [Trey Kane](https://wordpress.org/support/users/treykane/)
 * Last activity: [10 years, 11 months ago](https://wordpress.org/support/topic/query-random-images/#post-6106262)
 * Status: not resolved

## Topics

### Topics with no replies

### Non-support topics

### Resolved topics

### Unresolved topics

### All topics
