2

フレキシブル コンテンツ行にリピーター フィールドを追加しようとしていますが、何らかの理由で何も出力されません。フィールドを確認しましたが、正しいようですので、どこが間違っているのか教えていただけませんか? ありがとう

        <?php if(get_row_layout() == "collection_title"): // layout: Collection Title ?>

            <div>
                <h4><?php the_sub_field("collection_title"); ?></h4>
            </div>


        <?php elseif(get_row_layout() == "collection_images"): // layout: Collection Images ?>


                <?php if(get_field('collection_images_grid')): ?>

                    <?php while(has_sub_field('collection_images_grid')): ?>

                        <div class="collections">

                            <span><strong><?php the_sub_field('collection_detail'); ?></strong></span>

                            <a href="<?php the_sub_field('product_link'); ?>">

                                <img src="<?php the_sub_field('collection_image'); ?>"/>

                            </a>

                        </div>

                    <?php endwhile; ?>

                 <?php endif; ?>

        <?php endif; ?>

    <?php endwhile; ?>
4

5 に答える 5

0

あなたの<?php if(get_field('collection_images_grid')): ?>声明は<?php if(get_sub_field('collection_images_grid')): ?>

于 2013-12-12T01:26:39.647 に答える