私は最初のWordPressテーマで作業しており、高度なカスタムフィールドを使用してホームページにサービスセクションを作成しています。ACFエラーメッセージ
彼が使用するカスタムフィールドは、Repeaterフィールド、Textフィールド、Textareaフィールド、およびImageフィールドです。
私は私のコンテンツservices.phpファイル内のすべてのものを設定するが、私はWordPressサイトをロードするとき、私はここでParse error: syntax error, unexpected 'endif' (T_ENDIF), expecting end of file in/Users/brandonpowell/sites/valet/pixelcitytheme/web/app/themes/pixelcitytheme/templates/partials/content-services.php on line 46
<section class="services cf">
<div class="wrapper">
<?php // Start the loop
while (have_posts()) : the_post(); ?>
<?php if (the_rows('services_sections')):
while (have_rows('services_sections')): the_row(); ?>
<div class="service">
<div class="box-service">
<div class="pull-left">
<?php
$image = get_sub_field('services_icon');
if(!empty($image)): ?>
<img src="<?php echo $image['url']; ?>" alt="<?php echo $image['alt']; ?>" />
<?php endif; ?>
</div>
<div class="right-word">
<h3><?php the_sub_field('service_title') ?></h3>
<p><?php the_sub_field('services_description')?></p>
</div>
</div>
<div class="line"></div>
<div class="box-service">
<div class="pull-left">
<?php
$image = get_sub_field('services_icon');
if(!empty($image)): ?>
<img src="<?php echo $image['url']; ?>" alt="<?php echo $image['alt']; ?>" />
<?php endif; ?>
</div>
<div class="right-word">
<h3><?php the_sub_field('service_title') ?></h3>
<p><?php the_sub_field('services_description')?></p>
</div>
</div>
</div>
<?php endwhile; ?>
<?php endif; ?>
<?php endwhile; endif; // End of the Loop. ?>
</div>
</section>
ことを、私は私の上で作成しようとしていますどのような図をというエラーメッセージが表示されますブラウザ。
プログラミングの一般的なルールとして:あなたが適切にあなたのコードをインデントする場合は、非常に迅速に自分で問題を見るでしょう。 –