File "related-interview.php"

Full path: /home/xs854402/smcse.co.jp/public_html/test.smcse.co.jp/wp-content/themes/Sumitomo-Mitsui/template/related-interview.php
File size: 1.52 B
MIME-type: text/html
Charset: utf-8

Download   Open   Edit   Advanced Editor   Back

<section class="p-related l-related">
    <div class="p-related__inner l-inner">
        <p class="p-related__entitle c-entitle c-entitle--capitalize">related content</p>
        <h2 class="p-related__title c-title">関連コンテンツ</h2>
        <?php if(have_rows('related', 27)) : ?>
            <div class="p-related__items">
                <?php while(have_rows('related', 27)) : the_row(); ?>
                    <?php
                    $group = get_sub_field('related_item');
                    if($group) :
                    ?>
                        <a href="<?php echo $group['related_link']; ?>" class="p-related__item p-item p-item--related">
                            <?php
                            $acf_row_image = $group['related_img'];
                            $url = $acf_row_image['url'];
                            $alt = $acf_row_image['alt'];
                            if ($url) :
                            ?>
                                <div class="p-item__img c-img">
                                    <img src="<?php echo $url; ?>" alt="<?php echo $alt; ?>">
                                </div>
                            <?php endif; ?>
                            <div class="p-item__body">
                                <h3 class="p-item__title"><?php echo $group['related_title']; ?></h3>
                            </div>
                        </a>
                    <?php endif; ?>
                <?php endwhile; ?>
            </div>
        <?php endif; ?>
    </div>
</section>