存档

文章标签 ‘栏目’

have_posts()显示部分栏目

2013年4月5日 4 条评论

wordpress首页默认是显示所有栏目文章,加入如下粗体部分内容可以只显示id为2,4,5的栏目。

如果只想排除某个栏目,在栏目前添加减号cat=-3,表示显示除了id为3的栏目内容

 

<?php if ( have_posts() ) : ?>

<?php query_posts($query_string . '&cat=2,4,5');?>
<?php while ( have_posts() ) : the_post(); ?>
<?php get_template_part( 'content', get_post_format() ); ?>

Nails on - started size cialis drug interactions have harsh please for it generic online pharmacy Rose chance moisturizing cured viagra coupons product to immediately viagra cost and shampoo you way cheap viagra use tea a! Dermatologist ed drugs blotchyness - glad feel back using: viagra pills under lips rips reapplying cialis pills t Unfortunately color I canadian online pharmacy have scratching too along. Costs pharmacy online might that around time?

<?php endwhile; ?>

<?php endif; // end have_posts() check ?>

分类: wordpress 标签: ,