• Resolved richwalker

    (@richwalker)


    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

    (@dcooney)

    Hi @richwalker,
    The issue is likely orderby rand is not supported. So it is duplicating posts every query.

    Cheers,

    Thread Starter richwalker

    (@richwalker)

    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

    (@dcooney)

    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.