<?php
$wpb_all_query = new WP_Query(
array('post_type'=>'post', 'post_status'=>'publish', 'posts_per_page'=>-1)
);
if ($wpb_all_query->have_posts()) : ?>
<?php while ($wpb_all_query->have_posts()) : $wpb_all_query->the_post();
$cats = get_the_category();
if ($cats[0]->cat_name === 'Coaching') { ?>
<div class="callout horizontal">
<?php the_post_thumbnail() ?>
<div class="content">
<h5><?php the_title(); ?></h5>
<?php the_content(); ?>
</div>
</div>
<?php } ?>
<?php endwhile; ?>
<?php endif; ?>
위 코드는 제거 할 때 <?php echo get_field('column_two'); ?>
코드가 실행되도록합니다.템플릿에 게시물을 출력하면 그 아래에있는 태그가 에코로 표시되지 않습니다.
내 질문은 단순히 왜 코드 내 <?php echo get_field('column_two'); ?>
' php the_post_thumbnail()?>'줄에 세미콜론';'이 누락되었습니다. – coderodour
사실 고마워하지만 문제가 해결되지 않았습니다. – MaxwellLynn
PHP 태그를 닫으면 세미콜론이 자동으로 추가됩니다. –