不知道为什么,但我似乎无法在我的 wordpress 存档模板文件中获得页面导航。想知道是否有人可以在这里引导我朝着正确的方向前进...
这是代码:
<?php if (have_posts()) : ?>
<div class="pageDescriptBracket">
<img src="<?php bloginfo('template_url'); ?>/images/pdBracket.png">
</div> <!-- pageDescriptBracket -->
<h1>The Books</h1>
<div class="pageDescriptSmall">
An archive of the condominium's financial records
</div> <!-- pageDescriptSmall -->
<?php
$the_query = new WP_Query( array(
'posts_per_page' => 1)); // how many posts to show
while ( $the_query->have_posts() ) :
$the_query->the_post(); ?>
<div class="post" id="post-<?php the_ID(); ?>">
<div class="entryBooks">
<h2><?php the_title(); ?></h2>
<?php the_content(); ?>
</div>
<div class="clear"></div>
</div>
<?php endwhile; ?>
<div class="clear"></div>
<?php endif; ?>
<div class="postnav">
<div class="alignleft"><?php posts_nav_link('','','« Previous Entries') ?></div>
<div class="alignright"><?php posts_nav_link('','Next Entries »','') ?></div>
</div>