HEX
Server: Apache
System: Linux 4485441ca2e2 6.8.0-1039-aws #41~22.04.1-Ubuntu SMP Thu Sep 11 11:03:07 UTC 2025 aarch64
User: (1000)
PHP: 8.2.24
Disabled: NONE
Upload Files
File: /var/www/html/wp-content/themes/ganryujima_new_1602/single/tv.php
<?php if(have_posts()) : while(have_posts()) : the_post(); ?>
<article class="l-paper l-article m_single_tv">
  <?php
    $img = get_field('main_img');
    $imgurl = wp_get_attachment_image_src($img, 'large');
  ?>
  <div class="article-title">
    <h1><?php the_title(); ?></h1>
  </div>
  <div class="cover">
    <?php if($imgurl){ ?>
      <img class="image" src="<?php echo $imgurl[0]; ?>" alt="">
    <?php } else { ?>
      <img src="<?= home_url() ?>/assets/images/dummy3-2.jpg" alt="SAMURAI WARRIOR">
    <?php } ?>
  </div>
  <?php the_content(); ?>
  <dl class="m-tv-dl">
    <dt>番組名</dt>
    <dd><?php the_field('title',$post->ID); ?></dd>
    <dt>番組内容</dt>
    <dd><?php the_field('tv_contents',$post->ID); ?></dd>
    <?php if( get_field('mc') ){ ?>
      <dt>番組MC</dt>
      <dd><?php the_field('mc',$post->ID); ?></dd>
    <?php } ?>
    <?php if( get_field('broadcast') ){ ?>
      <dt>番組実況</dt>
      <dd><?php the_field('broadcast',$post->ID); ?></dd>
    <?php } ?>
    <?php if( get_field('moderator') ){ ?>
      <dt>番組司会</dt>
      <dd><?php the_field('moderator',$post->ID); ?></dd>
    <?php } ?>
    <?php if( get_field('commentary') ){ ?>
      <dt>番組解説</dt>
      <dd><?php the_field('commentary',$post->ID); ?></dd>
    <?php } ?>
    <dt>放送スケジュール</dt>
    <dd>
      <?php if( have_rows('schedule') ): ?>
      <ul>
      <?php while( have_rows('schedule') ): the_row(); ?>
        <?php
          $tvimg = get_sub_field('tvimage');
          $tvimgurl = wp_get_attachment_image_src($tvimg, '3-2');
        ?>
        <li>
          <p class="programm-title"><?php the_sub_field('schedule_title',$post->ID); ?></p>
          <p class="datetime">
            <span><?php the_sub_field('date',$post->ID); ?></span>
            <span><?php the_sub_field('start_time',$post->ID); ?> 〜 <?php if(get_sub_field('end_time',$post->ID)){the_sub_field('end_time',$post->ID);} ?></span>
          </p>
          <?php if($tvimgurl){ ?>
            <img src="<?php echo $tvimgurl[0]; ?>" alt="">
          <?php } ?>
          <?php if(get_sub_field('detail',$post->ID)){ ?>
            <div class="note"><?php the_sub_field('detail',$post->ID); ?></div>
          <?php } ?>
        </li>
      <?php endwhile; ?>
      </ul>
      <?php endif; ?>
    </dd>
  </dl>
  <?php include(TEMPLATEPATH.'/_page_sns.php'); ?>
</article>
<?php include('_links.php'); ?>
<?php endwhile; endif; ?>
<?php wp_reset_query(); ?>