0

我在类别中有一个帖子,我the_content()在我的循环中使用。之后,结果输出:Follower(有任何posts),只有我用echo get_the_content()的时候要显示的内容。为什么the_content()不工作?

请照亮...

这是代码

    <div id="ani-content">
     <?php 
        $gallery = new WP_Query('post_type=gallery');
        while($gallery -> have_posts()) : $gallery -> the_post();
     ?>
     <div class="wrap-frame">
         <div class="frame">
             <h2><?php the_title() ;?></h2>
             <div class="image">
               <?php if(has_post_thumbnail()) {the_post_thumbnail('p_images_gallery'); }?>
             </div>
             <div class="p_content">
                <?php echo get_the_content(); ?>
             </div>
             <div class="readmore"><a href="<?php the_permalink(); ?>">Readmore</a></div>
         </div>
     </div>
    <?php endwhile;wp_reset_query(); ?>
  </div>
4

0 回答 0