我想在我的页面中显示类别下的帖子。页面加载时应显示前5篇文章,当用户单击下一步按钮/链接时,应显示下5篇文章。目前我显示该类别下的所有帖子。下面是我用来显示该类别下所有帖子的模板。我知道我需要更改代码。但我不知道如何改变。请帮忙。
<div id="bloggers">
<?php $bloggers = new wp_Query("category_name=bloggers-blog&order=ASC&orderby=ID");?>
<?php
while ($bloggers->have_posts() ) :$bloggers->the_post();
$blogger_name = get_post_custom_values("blogger_name");
$blogger_desig = get_post_custom_values("blogger_desig");
$blogger_profile = get_post_custom_values("blogger_profile");
?>
<div id="blogger_contents">
<h1 style="font-weight:bold;font-size:16px;margin-top:10px;"><?php the_title();?></h2>
<div id="blogger_image">
<?php
if ( has_post_thumbnail() ) {
the_post_thumbnail();
}
?>
</div>
<div id="blogger_name">
<?php
if( is_array( $blogger_name ) )
{
foreach($blogger_name as $key => $value );
echo "$value</n>";
}
?>
</div>
<div id="blogger_desig">
<?php
if( is_array( $blogger_desig ) )
{
foreach($blogger_desig as $key => $value );
echo "$value</n></n>";
}
?>
</div>
<div id="blogger_profile">
<?php
if( is_array( $blogger_profile ) )
{
foreach($blogger_profile as $key => $value );
echo "$value</n>";
}
?>
</div>
<div id="options_to_connect" class="<?php the_ID();?>">
<a class="lbp-inline-link-1 cboxElement " href="#">Options To Connect</a>
</div>
</div>
<?php endwhile; ?>
<?php wp_reset_query(); ?>
<a href="#" class="prev">prev</a>
<a href="#" class="next">next</a>
</div>
我只需要显示5篇文章,当点击next时,我需要显示接下来的5篇(目前只有一篇)对此有什么建议吗?希望我已经说清楚了。