0
我在wp上构建一个站点,似乎无法克服这个障碍,当我转到特定的类别存档页面时,它显示所有来自所有类别的帖子,而不仅仅是那个类别中的帖子...想知道是否有人可以帮助我找出如何限制结果以显示来自所称类别的帖子。wp类别显示所有类别的所有帖子,而不是来自特定类别的特定帖子
这里是我的category.php
<?php get_header(); ?>
<div class="row">
<div class="span10">
<div class="gridContainer">
<?php
$the_query = new WP_Query(array(
'post_type' => 'post',
'orderby' => 'date',
'order' => 'DESC',
'posts_per_page' => 999)); // how many posts to show
$x = 0;
while ($the_query->have_posts()) :
$the_query->the_post(); ?>
<div class="view view-tenth">
<?php the_post_thumbnail('grid-image'); ?>
<div class="mask">
<h2><?php the_title(); ?></h2>
<p><?php the_excerpt(); ?></p>
<a href="<?php the_permalink(); ?>" class="info">Take Me To The Porn!</a>
</div> <!-- mask -->
</div> <!-- view view-tenth -->
<?php $x++; ?>
<?php endwhile; ?>
<?php wp_reset_query(); ?>
<div class="clear"></div>
</div> <!-- gridContainer -->
</div> <!-- span10 -->
<div class="span2">
<?php get_template_part('sidebar'); ?>
</div> <!-- span2 -->
</div> <!-- row -->
<?php get_footer(); ?>
THanks,工作! –