【发布时间】:2013-06-06 17:03:35
【问题描述】:
在wordpress中如何在侧边栏中按类别显示帖子?
【问题讨论】:
-
在这个页面的右侧,有大约20个类似的问题。他们中的大多数都有答案。
-
尝试了解
query_posts()的可能性。这很简单。
标签: wordpress
在wordpress中如何在侧边栏中按类别显示帖子?
【问题讨论】:
query_posts() 的可能性。这很简单。
标签: wordpress
[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;?>
【讨论】: