Title: Duplicate Posts
Last modified: October 26, 2016

---

# Duplicate Posts

 *  Resolved [richwalker](https://wordpress.org/support/users/richwalker/)
 * (@richwalker)
 * [9 years, 7 months ago](https://wordpress.org/support/topic/duplicate-posts-50/)
 * Hi
 * I have the following in my template and for some reason i have duplicate post
   showing and some posts not showing at all. Does anyone have any ideas what i 
   have done wrong?
 *     ```
       $cat = get_query_var('cat');
       $category = get_category ($cat);
       echo do_shortcode('[ajax_load_more posts_per_page="6" button_label="Loading more cottages" orderby="rand" category="'.$category->slug.'"]');
       ```
   

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

 *  Plugin Author [Darren Cooney](https://wordpress.org/support/users/dcooney/)
 * (@dcooney)
 * [9 years, 7 months ago](https://wordpress.org/support/topic/duplicate-posts-50/#post-8358439)
 * Hi [@richwalker](https://wordpress.org/support/users/richwalker/),
    The issue
   is likely orderby rand is not supported. So it is duplicating posts every query.
 * Cheers,
 *  Thread Starter [richwalker](https://wordpress.org/support/users/richwalker/)
 * (@richwalker)
 * [9 years, 7 months ago](https://wordpress.org/support/topic/duplicate-posts-50/#post-8358455)
 * Thank you for your rely. In your Shortcode Parameters it says it supports random
 * orderby – Order posts by date, title, name, menu order, random, author, post 
   ID or comment count. Default = ‘date’
 *  Plugin Author [Darren Cooney](https://wordpress.org/support/users/dcooney/)
 * (@dcooney)
 * [9 years, 7 months ago](https://wordpress.org/support/topic/duplicate-posts-50/#post-8358516)
 * sorry about that, it’s a mistake.
    I removed it from the shortcode builder but
   I guess I forgot to remove from the reader.

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

The topic ‘Duplicate Posts’ is closed to new replies.

 * ![](https://ps.w.org/ajax-load-more/assets/icon-256x256.png?rev=2944639)
 * [Ajax Load More – Infinite Scroll, Load More, & Lazy Load](https://wordpress.org/plugins/ajax-load-more/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/ajax-load-more/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/ajax-load-more/)
 * [Active Topics](https://wordpress.org/support/plugin/ajax-load-more/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/ajax-load-more/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/ajax-load-more/reviews/)

 * 3 replies
 * 2 participants
 * Last reply from: [Darren Cooney](https://wordpress.org/support/users/dcooney/)
 * Last activity: [9 years, 7 months ago](https://wordpress.org/support/topic/duplicate-posts-50/#post-8358516)
 * Status: resolved