HighLab

single.phpテンプレート

  • 公開日:
  • 更新日:
  • 文字数:1049文字
<article class="single-content">
  <?php if (have_posts()) : while (have_posts()) : the_post(); ?>
  <?php $cats = get_the_category(); ?>
  <h1 class="single-heading"><?php the_title(); ?></h1>
  <div class="single-info">
    <time class="single-info__time"></time>
  </div>
  <div class="post-archive__item__info">
  <div class="post-archive__item__info">
    <time class="post-archive__item__info__time"><?php the_time('Y.m.d'); ?></time>
    <?php foreach($cats as $cat): ?>
    <span class="post-archive__item__info__category"><a href="<?php echo get_category_link($cat->cat_ID); ?>"><?php echo $cat->cat_name; ?></a></span>
    <?php endforeach; ?>
  </div>
  <?php the_post_thumbnail('my_thumbnail_large'); ?>
  <div class="single-content">
    <?php the_content(); ?>
  </div>
  <?php endwhile; ?>
  <?php else : ?>
  <?php endif; ?>
</article>