网站要是置顶文章多了,就会堆积在网站首页,那么怎么不显示置顶的文章呢?
<?php $the_query = new WP_Query( array( 'post__not_in' => get_option( 'sticky_posts' ) ) ); if ( $the_query->have_posts() ) : while ( $the_query->have_posts() ) : $the_query->the_post(); ?>
网站要是置顶文章多了,就会堆积在网站首页,那么怎么不显示置顶的文章呢?
<?php $the_query = new WP_Query( array( 'post__not_in' => get_option( 'sticky_posts' ) ) ); if ( $the_query->have_posts() ) : while ( $the_query->have_posts() ) : $the_query->the_post(); ?>
1 个评论