File "read-other.php"
Full path: /home/xs854402/smcse.co.jp/public_html/test.smcse.co.jp/wp-content/themes/Sumitomo-Mitsui/template/read-other.php
File
size: 2.56 B (2.56 KB bytes)
MIME-type: text/x-php
Charset: utf-8
Download Open Edit Advanced Editor Back
<?php $post_id = get_the_ID(); ?>
<section class="p-related<?php if(!($post_id == 215)){echo ' p-related--bg';} ?> l-related">
<div class="p-related__inner l-inner">
<p class="p-related__entitle c-entitle c-entitle--capitalize">read other interviews</p>
<h2 class="p-related__title c-title">他のインタビューを読む</h2>
<?php
$the_query = new WP_Query();
$param = array(
'post_type' => 'interview',
'posts_per_page' => '3',
'post_status' => 'publish',
'post__not_in'=> array(get_the_ID(), 215),
);
$the_query->query($param);
if ($the_query->have_posts()) :
?>
<div class="p-related__items">
<?php while( $the_query->have_posts() ) : $the_query->the_post(); ?>
<a href="<?php the_permalink(); ?>" class="p-related__item p-item p-item--interview">
<div class="p-item__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>
<?php
if(have_rows('introduction')) :
while (have_rows('introduction')) : the_row();
?>
<div class="p-item__body">
<h3 class="p-item__title"><?php the_title(); ?></h3>
<p class="p-item__position"><?php the_sub_field('introduction-position'); ?></p>
<p class="p-item__name"><?php the_sub_field('introduction-name'); ?><span><?php if(get_sub_field('introduction-year')) {echo the_sub_field('introduction-year').'入社'; } ?></span></p>
</div>
<?php
endwhile;
endif;
?>
</a>
<?php endwhile; ?>
</div>
<?php
endif;
wp_reset_postdata();
?>
<div class="p-related__link">
<a href="<?php echo esc_url(home_url('/employment/interview/')); ?>" class="c-button">インタビュー一覧を見る</a>
</div>
</div>
</section>