1
這是可能的循環隨機沒有重複的條目?訂單隨機沒有重複頁
這是我的代碼,但在第2頁,重複第1頁的帖子
<?php global $query_string;
query_posts($query_string . '&orderby=rand'); ?>
<?php while(have_posts()): the_post(); ?>
<div id="post-<?php the_ID(); ?>" <?php post_class(); ?>>
<div class="post-content">
您可以創建的數組在此query_posts期間檢索到的id值,並通過在您的query_string:array(1,2,3)中附加'post__not_in'=> array(1,2,3)將該數組傳遞給下一頁的query_posts將是arra y持有前一頁的id值......或分頁查詢初始結果 – zoranc
uooh !!真的感謝。現在我明白了一些,但是你能幫我一個代碼示例或類似的東西嗎?感謝 – vektor
種子的查詢和每個會話分頁結果,看看[這個](http://wordpress.stackexchange.com/questions/31647/is-it-possible-to-paginate-posts-correctly-that - 是隨機排序的)......他們在回答 – zoranc