File "page-person.php"

Full path: /home/xs854402/smcse.co.jp/public_html/wp-content/themes/Sumitomo-Mitsui/page-person.php
File size: 4.34 B (4.34 KB bytes)
MIME-type: text/x-php
Charset: utf-8

Download   Open   Edit   Advanced Editor   Back

<?php get_header('employment'); ?>
<main>
    <?php include('template/bottom.php'); ?>
    <?php include('template/breadcrumb.php'); ?>
    <section class="p-person">
        <div class="p-person__heading">
            <div class="p-person__inner l-inner">
                <?php
                if(have_rows('section01')) :
                while (have_rows('section01')) : the_row();
                ?>
                    <p class="p-person__entitle c-entitle"><?php the_sub_field('section01-entitle'); ?></p>
                    <h2 class="p-person__title c-title"><?php the_sub_field('section01-title'); ?></h2>
                <?php
                endwhile;
                endif;
                ?>
                <div class="p-person__container u-fadein">
                    <?php if(have_rows('section02')) : ?>
                        <div class="p-person__items">
                            <?php
                            while (have_rows('section02')) : the_row();
                            if(get_sub_field('section02-block')) :
                            $group = get_sub_field('section02-block');
                            foreach($group as $field) :
                            ?>
                                <div class="p-person__item p-personItem"><p><?php echo $field['section02-theme']; ?></p></div>
                            <?php
                            endforeach;
                            endif;
                            endwhile;
                            ?>
                        </div>
                    <?php endif; ?>
                    <?php
                    if(have_rows('section01')) :
                    while (have_rows('section01')) : the_row();
                    ?>
                        <p class="p-person__text c-text"><?php the_sub_field('section01-text'); ?></p>
                    <?php
                    endwhile;
                    endif;
                    ?>
                </div>
            </div>
        </div>
        <div class="p-person__contents">
            <div class="p-person__inner l-inner">
                <?php
                if(have_rows('section02')) :
                while (have_rows('section02')) : the_row();
                ?>
                    <p class="p-person__entitle c-entitle"><?php the_sub_field('section02-entitle'); ?></p>
                    <h2 class="p-person__title c-title"><?php the_sub_field('section02-title'); ?></h2>
                    <div class="p-person__container u-fadein">
                        <div class="p-person__blocks">
                            <?php
                            if(get_sub_field('section02-block')) :
                            $group = get_sub_field('section02-block');
                            foreach($group as $field) :
                            ?>
                                <div class="p-person__block">
                                    <?php
                                    $acf_row_image = $field['section02-img'];
                                    $url = $acf_row_image['url'];
                                    $alt = $acf_row_image['alt'];
                                    if ($url) :
                                    ?>
                                        <div class="p-person__img c-img">
                                            <img src="<?php echo $url; ?>" alt="<?php echo $alt; ?>">
                                        </div>
                                    <?php endif; ?>
                                    <div class="p-person__wrap">
                                        <h3 class="p-person__theme"><?php echo $field['section02-theme']; ?></h3>
                                        <h4 class="p-person__subject"><?php echo $field['section02-blocktitle']; ?></h4>
                                        <p class="p-person__blockText c-text"><?php echo $field['section02-description']; ?></p>
                                    </div>
                                </div>
                            <?php
                            endforeach;
                            endif;
                            ?>
                        </div>
                    </div>
                <?php
                endwhile;
                endif;
                ?>
            </div>
        </div>
    </section>
    <?php include('template/related.php'); ?>
</main>
<?php get_footer('employment');