我希望在页面上的存档查询中只插入一次外部div元素。例如:
Post1
Post2【静态分区】Post4Post5。。。etc我的查询是:
<?php
$archive_args = array(
post_type => \'post\',
\'category_name\' => \'category\',
\'posts_per_page\'=> -1,
\'meta_key\' => \'number\',
\'order\' => \'ASC\'
);
$archive_query = new WP_Query( $archive_args );?>
<?php while ( $archive_query->have_posts() ) : $archive_query->the_post(); // run the custom loop ?>
<article <?php post_class(); ?>>
The Content
</article>
<?php endwhile; ?>
<?php wp_reset_postdata(); ?>
showposts参数可能有用吗?
谢谢