<div class="single_post">
<?php
// The Query
query_posts( $args );
// The Loop
if(have_posts()) :
while ( have_posts() ) : the_post();
?>
<div class="left_date">
<h1><?php the_time(\'d\') ?></h1>
<p><?php the_time(\'M\') ?></p>
<span class="year"><p><?php the_time(\'Y\') ?></p></span>
</div>
<a href="<?php the_permalink(); ?>" ><h2><?php the_title(); ?></h2></a>
<div class="author_tag">
<span class="author">By: <?php the_author_posts_link(); ?></span>
<span class="tag"><?php the_tags(); ?></span>
</div>
<div class="post">
<p><?php the_content(); ?></p>
<div class="read_comment">
<a href="#" title="Full post"><span class="read">Read more</span></a>
<a href="#" title="Comment here"><span class="comment">Comment</span></a>
</div>
</div>
<div class="clear"></div>
<div class="gap"></div>
<?php
endwhile;
endif;
// Reset Query
wp_reset_query();
?>
<div class="nav-previous"><?php next_posts_link( __( \'<span class="meta-nav">←</span> Older posts\') ); ?></div>
<div class="nav-next"><?php previous_posts_link( __( \'Newer posts <span class="meta-nav">→</span>\') ); ?></div>
</div>
整个代码运行良好。但最后两行不起作用,我的意思是“下一篇文章”和“上一篇文章”按钮没有出现。
<div class="nav-previous"><?php next_posts_link( __( \'<span class="meta-nav">←</span> Older posts\') ); ?></div>
<div class="nav-next"><?php previous_posts_link( __( \'Newer posts <span class="meta-nav">→</span>\') ); ?></div>
为什么会这样?是为了
query_posts( $args )
函数我使用了什么?我现在该怎么办?我只想显示两页链接。我认为解决方案应该非常简单。