添加这行代码并调整if语句会损坏循环中的链接。我真的不明白为什么会这样。代码行有什么问题?
<?php $query = new WP_Query( array( \'post__not_in\' => get_option( \'sticky_posts\' ) ) ); ?>
<?php if ( $query->have_posts() ) : while ( $query->have_posts() ) : $query->the_post(); ?>
<div class="posts__post">
<article>
<a class="posts__post--preview" href="<?php the_permalink(); ?>"><?php the_post_thumbnail(); ?></a>
<p class="posts__post--tag"><?php the_category(\' / \'); ?></p>
<h1 class="posts__post--title"><a href="<?php the_permalink(); ?>"><?php the_title(); ?></a></h1>
<p class="posts__post--meta"><?php echo time_ago(); ?></p>
</article>
</div>
<?php endwhile; else :?>
<h1><?php _e(\'no post where found!\',\'blog\'); ?></h1>
<?php endif; ?>
</div>