Viewing 2 replies - 1 through 2 (of 2 total)
  • Plugin Author Tubal

    (@tubal)

    but rather shuffles the order of the posts that appear on each archive page.

    Yes, that’s the intended behavior.

    Is there a way to get it to randomize ALL posts within a category so that different posts can appear on the first archive page?

    Not with this plugin.

    Regards,

    Túbal

    Try Below code..

    1. Select the post from category:
    $args = array(‘cat’ => $category_id,’post_status’ =>’publish’,’posts_per_page’=>-1,’orderby’ => ‘post_date’,’order’=>’DESC’);
    $random_posts_arr = query_posts($args);

    2. shuffle or randomize the post array…
    $post_arr = shuffle($random_posts_arr);

    3. Then traverse the post array ($post_arr) to show the post data (title, link, image, date)

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘[Plugin: Sort Query Posts] How to randomize ALL posts within a category’ is closed to new replies.