Title: Sort Randomly
Last modified: August 21, 2016

---

# Sort Randomly

 *  Resolved [Lightpurple](https://wordpress.org/support/users/pamkaur14/)
 * (@pamkaur14)
 * [12 years ago](https://wordpress.org/support/topic/sort-randomly/)
 * Hi Sudar,
 * Could you tell me what code I need to insert into the shortcode to display the
   posts in a random manner? I have tried order_by = random and order-by = random
   and neither of them worked.
 * Just thinking, I assume that this displays the posts in a random manner.
 * [https://wordpress.org/plugins/posts-by-tag/](https://wordpress.org/plugins/posts-by-tag/)

Viewing 4 replies - 1 through 4 (of 4 total)

 *  Thread Starter [Lightpurple](https://wordpress.org/support/users/pamkaur14/)
 * (@pamkaur14)
 * [12 years ago](https://wordpress.org/support/topic/sort-randomly/#post-4884474)
 * Also, with the exclude code, can I use this to exclude certain tags? Can I insert
   this into the shortcode as well? If yes, what do I need to insert into the shortcode?
   I used exclude = “tag” and is didn’t work.
 * Cheers.
 *  Thread Starter [Lightpurple](https://wordpress.org/support/users/pamkaur14/)
 * (@pamkaur14)
 * [12 years ago](https://wordpress.org/support/topic/sort-randomly/#post-4884575)
 * hi Sudar,
 * I figured out through another plugin that the code for a random sort should be
   orderby=rand. However, when I inserted this into the shortcode, nothing changed.
   I have 10 posts that I have chosen to show 5 of in a random order but your plugin
   doesn’t seem to be working.
 *  Thread Starter [Lightpurple](https://wordpress.org/support/users/pamkaur14/)
 * (@pamkaur14)
 * [12 years ago](https://wordpress.org/support/topic/sort-randomly/#post-4884580)
 * Hi Sudar,
 * Don’t worry about solving any of my queries. It was just getting too hard and
   taking too much time so I have decided to use other plugins and they are working
   great on my website.
 * Cheers.
 *  Plugin Author [Sudar Muthu](https://wordpress.org/support/users/sudar/)
 * (@sudar)
 * [12 years ago](https://wordpress.org/support/topic/sort-randomly/#post-4884589)
 * As documented in the homepage, you have to use order_by=”random” in the shortcode.
 * My plugin caches results from the db for performance. So you will not see the
   sorting order immediately.

Viewing 4 replies - 1 through 4 (of 4 total)

The topic ‘Sort Randomly’ is closed to new replies.

 * ![](https://s.w.org/plugins/geopattern-icon/posts-by-tag.svg)
 * [Posts By Tag](https://wordpress.org/plugins/posts-by-tag/)
 * [Support Threads](https://wordpress.org/support/plugin/posts-by-tag/)
 * [Active Topics](https://wordpress.org/support/plugin/posts-by-tag/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/posts-by-tag/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/posts-by-tag/reviews/)

## Tags

 * [random display](https://wordpress.org/support/topic-tag/random-display/)

 * 4 replies
 * 2 participants
 * Last reply from: [Sudar Muthu](https://wordpress.org/support/users/sudar/)
 * Last activity: [12 years ago](https://wordpress.org/support/topic/sort-randomly/#post-4884589)
 * Status: resolved