今日、WordPress にシーケンス スライダーと高度なカスタム ファイル プラグインを統合しようとしています。
私が直面した問題があります。カスタムファイル名 "slider_type" のフィールドを事前に作成します。次に、2 つの条件付きフィールドを作成します。image_slider と video_slider。
今、私はそれを自分の WordPress ホームページ/WordPress テーマに表示したいと考えています。
つまり、バックエンドからスライダータイプの画像を選択すると、フォントエンドは画像機能のみ、またはその表示のみの画像を機能させます。またはその表示ビデオではありません。
ここに私が書いた私のコードがあります:
<ul class="sequence-canvas">
<?php
query_posts('post_type=myslider');
if (have_posts()) : while (have_posts()) : the_post();
?>
<li class="<?php the_field('li_class'); ?>">
<div class="<?php the_field('layout_of_slider'); ?>">
<h2><?php the_title(); ?></h2>
<p><?php the_content(); ?></p>
</div>
<?php if(get_field('slider_type') == "Image") {
<img src=\"<?php (get_field('slider_image'); ?>\">
}
else {
<p><?php (get_field('slider_video'); ?></p>
}
?>
<?php endwhile; endif; wp_reset_query(); ?>
</li>
</ul>
このコードを実行すると、WordPress テーマが空白で表示されます。ここでの障害は何ですか?