最新消息:雨落星辰是一个专注网站SEO优化、网站SEO诊断、搜索引擎研究、网络营销推广、网站策划运营及站长类的自媒体原创博客

Loop only shows first two posts

programmeradmin5浏览0评论

this team section. loop through team members. it just shows the first two members. whatever I added after the first two members, do not appear. so what the wrong here, please?

<section id="our-team" class="padding bglight">
   <div class="container">
      <div class="row">
         <div class="col-md-8 offset-md-2 col-sm-12 text-center">
            <div class="heading-title wow fadeInUp" data-wow-delay="300ms">
               <span>Heros Behind the Company</span>
                    <?php $team_sec = get_field('team_sec'); ?>
               <h2 class="darkcolor bottom20"><?php echo $team_sec['title']; ?></h2>
               <p class="heading_space"><?php echo $team_sec['text']; ?> </p>
            </div>
         </div>
      </div>
      <div class="row">

        <div class="col-md-12">

        

           <div id="ourteam-slider" class="owl-carousel">
           
<?php $loop = new WP_Query(array( 'post_type' => 'team_member', 'orderby' => 'post_id', 'order' => 'ASC')); ?>
<?php while($loop->have_posts()) : $loop->the_post(); ?>
<?php $team_member = get_field('team_member'); ?>
           <div class="item">
              <div class="team-box">
                  <div class="image">
                    <img src="<?php echo $team_member['image']; ?>" alt="">
                  </div>
               <div class="team-content gradient_bg whitecolor">
                  <h3><?php echo $team_member['name']; ?></h3>
                  <p class="bottom40"><?php echo $team_member['role']; ?></p>
                  <div class="progress-bars">
                     <div class="progress">
                        <p><?php echo $team_member['skill']; ?></p>
                        <div class="progress-bar" data-value="90"><span><?php echo $team_member['skill_percentage']; ?></span></div>
                     </div>
                     <div class="progress">
                        <p><?php echo $team_member['skill_2']; ?></p>
                        <div class="progress-bar" data-value="75"><span><?php echo $team_member['skill_percentage_2']; ?></span></div>

                     </div>

                  </div>

               </div>

            </div>

           </div>
           <?php endwhile; wp_reset_query(); ?>  

</section>

与本文相关的文章

发布评论

评论列表(0)

  1. 暂无评论