File "archive-interview.php"

Full path: /home/xs854402/smcse.co.jp/public_html/wp-content/themes/Sumitomo-Mitsui/archive-interview.php
File size: 7.73 B (7.73 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-interview.php'); ?>
    <?php include('template/breadcrumb.php'); ?>
    <section class="p-interview">
        <div class="p-interview__heading">
            <div class="p-interview__inner l-inner">
                <p class="p-interview__entitle c-entitle">cross talk</p>
                <h2 class="p-interview__title c-title">特別座談会</h2>
                <?php
                $the_query = new WP_Query();
                $param = array(
                    'post_type'      => 'interview',
                    'post_status'    => 'publish',
                    'post__in'       => array(215),
                );
                $the_query->query($param);
                if ($the_query->have_posts()) :
                while( $the_query->have_posts() ) : $the_query->the_post();
                ?>
                    <?php
                    if(have_rows('introduction')) :
                    while (have_rows('introduction')) : the_row();
                    ?>
                        <div class="p-interview__headingBlock">
                            <?php
                            $acf_row_image = get_sub_field('introduction-img');
                            $url = $acf_row_image['url'];
                            $alt = $acf_row_image['alt'];
                            if ($url) :
                            ?>
                                <div class="p-interview__img c-img">
                                    <img src="<?php echo $url; ?>" alt="<?php echo $alt; ?>">
                                </div>
                            <?php endif; ?>
                            <div class="p-interview__wrap">
                                <h3 class="p-interview__theme"><?php the_sub_field('introduction-title'); ?></h3>
                                <?php if(get_sub_field('introduction-text')) : ?>
                                    <p class="p-interview__crossText c-text"><?php the_sub_field('introduction-text'); ?></p>
                                <?php endif; ?>
                                <div class="p-interview__info p-interview__info--cross">
                                    <div class="p-interview__crossWrap">
                                        <div class="p-interview__infoBlock">
                                            <p class="p-interview__position"><?php the_sub_field('introduction-position'); ?></p>
                                            <p class="p-interview__name"><?php the_sub_field('introduction-name'); ?> <?php if(get_sub_field('introduction-year')) {echo the_sub_field('introduction-year').'入社'; } ?></p>
                                        </div>
                                        <div class="p-interview__infoBlock">
                                            <p class="p-interview__position"><?php the_sub_field('introduction-position02'); ?></p>
                                            <p class="p-interview__name"><?php the_sub_field('introduction-name02'); ?> <?php if(get_sub_field('introduction-year02')) {echo the_sub_field('introduction-year02').'入社'; } ?></p>
                                        </div>
                                        <div class="p-interview__infoBlock">
                                            <p class="p-interview__position"><?php the_sub_field('introduction-position03'); ?></p>
                                            <p class="p-interview__name"><?php the_sub_field('introduction-name03'); ?> <?php if(get_sub_field('introduction-year03')) {echo the_sub_field('introduction-year03').'入社'; } ?></p>
                                        </div>
                                        <div class="p-interview__infoBlock">
                                            <p class="p-interview__position"><?php the_sub_field('introduction-position04'); ?></p>
                                            <p class="p-interview__name"><?php the_sub_field('introduction-name04'); ?> <?php if(get_sub_field('introduction-year04')) {echo the_sub_field('introduction-year04').'入社'; } ?></p>
                                        </div>
                                    </div>
                                </div>
                                <div class="p-interview__link">
                                    <a href="<?php echo esc_url(home_url('/interview/round-table-discussion/')); ?>" class="c-button">詳細を見る</a>
                                </div>
                            </div>
                        </div>
                    <?php
                    endwhile;
                    endif;
                    ?>
                <?php
                endwhile;
                endif;
                wp_reset_postdata();
                ?>
            </div>
        </div>
        <div class="p-interview__posts">
            <div class="p-interview__inner l-inner">
                <p class="p-interview__entitle c-entitle">interview</p>
                <h2 class="p-interview__title c-title">社員インタビュー</h2>
                <?php
                $the_query = new WP_Query();
                $param = array(
                    'post_type'      => 'interview',
                    'posts_per_page' => '-1',
                    'post_status'    => 'publish',
                    'post__not_in'=> array(215),
                );
                $the_query->query($param);
                if ($the_query->have_posts()) :
                ?>
                    <div class="p-interview__items">
                        <?php while( $the_query->have_posts() ) : $the_query->the_post(); ?>
                            <a href="<?php the_permalink(); ?>" class="p-interview__item p-interviewPost">
                                <div class="p-interviewPost__img c-img">
                                    <?php
                                    if (has_post_thumbnail()) :
                                        the_post_thumbnail('post-thumbnail', array('alt' => the_title_attribute('echo=0')));
                                    else :
                                        echo '<img src="'.get_template_directory_uri().'/images/common/noimage.jpg" alt="'.esc_html(get_the_title()).'">';
                                    endif; ?>
                                </div>
                                <div class="p-interviewPost__body">
                                    <h3 class="p-interviewPost__title"><?php the_title(); ?></h3>
                                    <?php
                                    if(have_rows('introduction')) :
                                    while (have_rows('introduction')) : the_row();
                                    ?>
                                        <div class="p-interviewPost__bottom">
                                            <p class="p-interviewPost__position"><?php the_sub_field('introduction-position'); ?></p>
                                            <p class="p-interviewPost__name"><?php the_sub_field('introduction-name'); ?><span><?php if(get_sub_field('introduction-year')) {echo the_sub_field('introduction-year').'入社'; } ?></span></p>
                                            <div class="p-interviewPost__arrow"></div>
                                        </div>
                                    <?php
                                    endwhile;
                                    endif;
                                    ?>
                                </div>
                            </a>
                        <?php endwhile; ?>
                    </div>
                <?php
                endif;
                wp_reset_postdata();
                ?>
            </div>
        </div>
    </section>
    <?php include('template/related-interview.php'); ?>
</main>
<?php get_footer('employment');