我在向循环添加查询时遇到问题。
请看看有什么问题。
<div class="fl" id="main_article">
<?php $count = 1;
$the_query = new WP_Query( \'category_name=headline&orderby=post_date&order=desc\' );
if ( $the_query->have_posts() ) : while (have_posts()) : $the_query->the_post(); if($count == 1) : ?>
<a href="<?php the_permalink() ?>" rel="bookmark" title=""><?php the_title(); ?></a>
<?php dynamic_excerpt(400); ?>
<?php else : ?>
<div class="post">
<a href="<?php the_permalink() ?>" rel="bookmark" title=""><?php the_title(); ?></a>
<?php dynamic_excerpt(400); ?> </div>
<?php if ($count== 2 || $count == 4 ){ ?>
<?php dynamic_sidebar(\'index-insert\') ?>
<?php } ?>
<?php $count = $count + 0; ?>
<?php endif; ?>
<?php $count++; ?>
<?php endwhile; ?> </div>