1
我水平在兩列中顯示20級10的主題類別的職位,如:文章導航
我使用下面的代碼:
<?php if (have_posts()) : while(have_posts()) : $i++; if(($i % 2) == 0) :
$wp_query->next_post(); else : the_post(); ?>
<div id="left-column">
<h1><?php the_permalink(); ?></h1>
<?php the_content(); ?>
</div>
<?php endif; endwhile; else: ?>
<?php endif; ?>
<?php $i = 0; rewind_posts(); ?>
<?php if (have_posts()) : while(have_posts()) : $i++; if(($i % 2) !== 0) : $wp_query->next_post(); else : the_post(); ?>
<div id="right-column">
<h1><?php the_permalink(); ?></h1>
<?php the_content(); ?>
</div>
<?php endif; endwhile; else: ?>
<?php endif; ?>
如果我點擊帖子#1並移動到單個帖子顯示頁面,其中在頁面的頂部/底部顯示完整帖子顯示和兩個鏈接(下一帖子,上一帖子)。然後點擊下一篇文章鏈接進入帖子#3。但我需要顯示帖子#2然後張貼#3,帖子#4 ....怎麼可能。?
謝謝
嗨馬庫斯,非常感謝它的作品。 –
沒問題,交配。我很高興能夠提供幫助。 –