开发者

wordpress - posts by category

in wordpress how to display p开发者_如何学运维osts by category in sidebar?


  1. Try this plugin for listing the category posts as widget for your sidebar.

Category Posts Widget

                               [OR]


<?php query_posts('category_name=your-category-name&showposts=5&order=asc'); ?>
<?php while (have_posts()) : the_post(); ?>
<h2 class="head1"><?php the_title(); ?></h2>   
<?php the_content(); ?>
<?php endwhile;?>
0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜