小编son*_*kan的帖子

解析错误:语法错误,意外的“endif”(T_ENDIF)?

我在使用 php endif 时出错,找不到错误。在这里我给出了我的代码。请帮我解决这个问题

       <?php if( have_rows('home-video-slider') ): ?>
            <?php while( have_rows('home-video-slider') ): the_row(); 
              $video_banner = get_sub_field('video-banner');
             ?>
             <div class="item">
                <div class="fm-video-banner">
                        <?php if( $video_banner ); ?>
                        <img  src="<?php echo $video_banner['url']; ?>"/>
                        <?php endif; ?>

                    <a class="popup-youtube fm-play-icon" 
                      href="https://www.youtube.com/embed/5ktgB9hlETw">
                        <span>
                            <i class="fa fa-play" aria-hidden="true"></i>
                        </span>
                    </a>
                </div>
            </div>
            <?php $p++; endwhile; ?>
     <?php endif; ?>
Run Code Online (Sandbox Code Playgroud)

php wordpress

2
推荐指数
1
解决办法
7632
查看次数

标签 统计

php ×1

wordpress ×1