File "bottom.php"
Full path: /home/xs854402/smcse.co.jp/public_html/test.smcse.co.jp/wp-content/themes/Sumitomo-Mitsui/template/bottom.php
File
size: 1.55 B
MIME-type: text/x-php
Charset: utf-8
Download Open Edit Advanced Editor Back
<?php
if (have_rows('bottom-fv')) :
while (have_rows('bottom-fv')) : the_row();
$acf_row_image_pc = get_sub_field('bottom-fv-img-pc');
$acf_row_image_sp = get_sub_field('bottom-fv-img-sp');
$url_pc = $acf_row_image_pc['url'];
$url_sp = $acf_row_image_sp['url'];
?>
<style>
<?php if($url_sp) : ?>
.p-bottomFv {
background-image: url(<?php echo $url_sp; ?>);
}
<?php else : ?>
.p-bottomFv {
background-image: url('<?php echo get_stylesheet_directory_uri(); ?>/images/common/fv-bottom-sp.jpg');
}
<?php endif; ?>
<?php if($url_pc) : ?>
@media screen and (min-width: 768px) {
.p-bottomFv {
background-image: url(<?php echo $url_pc; ?>);
}
}
<?php else : ?>
@media screen and (min-width: 768px) {
.p-bottomFv {
background-image: url('<?php echo get_stylesheet_directory_uri(); ?>/images/common/fv-bottom.jpg');
}
}
<?php endif; ?>
</style>
<section class="p-bottomFv">
<div class="p-bottomFv__inner l-inner">
<div class="p-bottomFv__container">
<?php if(get_sub_field('bottom-fv-title')) : ?>
<h1 class="p-bottomFv__title"><?php the_sub_field('bottom-fv-title'); ?></h1>
<?php else : ?>
<h1 class="p-bottomFv__title"><?php echo $title; ?></h1>
<?php endif; ?>
<?php if(get_sub_field('bottom-fv-text')) : ?>
<p class="p-bottomFv__text c-text"><?php the_sub_field('bottom-fv-text'); ?></p>
<?php endif; ?>
</div>
</div>
</section>
<?php
endwhile;
endif;