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>

4
  • 1
    it looks ok, take a look at Settings > Reading to see if Blog pages show at most is not set to 2, if it is, set it to higher number Jul 17, 2020 at 23:23
  • @Kresimir Pendic thanks for your reply. of course, I already set it to 2, but it is for blog not for the front page where team section exist. so what should I do to achieve that? and thanks in advance
    – social
    Jul 17, 2020 at 23:28
  • 2
    add your desired 'posts_per_page' to the args of your custom query.
    – Michael
    Jul 18, 2020 at 1:06
  • @Michael thanks so much for reply
    – social
    Jul 18, 2020 at 16:20

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Browse other questions tagged or ask your own question.