T
T
testtoster2019-06-13 11:00:49
Frontend
testtoster, 2019-06-13 11:00:49

How to adapt the block?

I'm doing content output in wordpress using acf pro. I use a repeater, but the blocks are duplicated one in the other. Tell me what I'm doing wrong and how to make the card positioned on the left side of the bootstrap grid

<div class="row">
        <div class="personal">
          <?php if( have_rows('project_company') ): ?>
            <?php while( have_rows('project_company') ): the_row(); 
              $image = get_sub_field('project_company_img');
              $content = get_sub_field('project_company_content');
              ?>
              <div class="col-md-6 mb">
              <img src="<?php echo $image['url']; ?>" alt="<?php echo $image['alt'] ?>" />
              <div class="personal-card">
                <div class="personal-card__content">
                  <?php echo $content; ?>
                </div>
              </div>
            <?php endwhile; ?>
          <?php endif; ?>
        </div>
      </div>
    </div>

Answer the question

In order to leave comments, you need to log in

1 answer(s)
M
Mikhail Shvedkov, 2019-06-13
@testtoster

5d0219ed2332e226184760.png
Maybe you should close the open tag BEFORE exiting the loop and conditions?)

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question