.elementor-kit-492{--e-global-color-primary:#6EC1E4;--e-global-color-secondary:#54595F;--e-global-color-text:#7A7A7A;--e-global-color-accent:#61CE70;--e-global-color-28922a1:#FE7E43;--e-global-color-702b347:#0088FF;--e-global-color-671bbc3:#FE7E43;--e-global-typography-primary-font-family:"Noto Sans KR";--e-global-typography-primary-font-weight:600;--e-global-typography-secondary-font-family:"Noto Sans KR";--e-global-typography-secondary-font-weight:400;--e-global-typography-text-font-family:"Noto Sans KR";--e-global-typography-text-font-weight:400;--e-global-typography-accent-font-family:"Noto Sans KR";--e-global-typography-accent-font-weight:500;}.elementor-kit-492 e-page-transition{background-color:#FFBC7D;}.elementor-kit-492 p{margin-block-end:0px;}.elementor-section.elementor-section-boxed > .elementor-container{max-width:1140px;}.e-con{--container-max-width:1140px;}.elementor-widget:not(:last-child){--kit-widget-spacing:20px;}.elementor-element{--widgets-spacing:20px 20px;--widgets-spacing-row:20px;--widgets-spacing-column:20px;}{}h1.entry-title{display:var(--page-title-display);}@media(max-width:1024px){.elementor-section.elementor-section-boxed > .elementor-container{max-width:1024px;}.e-con{--container-max-width:1024px;}}@media(max-width:767px){.elementor-section.elementor-section-boxed > .elementor-container{max-width:767px;}.e-con{--container-max-width:767px;}}/* Start custom CSS */<?php
/**
 * Category Archive Template
 * /wp-content/themes/자식테마/category.php
 */

get_header();
?>

<div class="tc-container">

  <header class="tc-archive-header">
    <h1 class="tc-archive-title">
      <?php single_cat_title(); ?>
    </h1>

    <?php if (category_description()) : ?>
      <p class="tc-archive-description">
        <?php echo category_description(); ?>
      </p>
    <?php endif; ?>
  </header>

  <?php if (have_posts()) : ?>
    <div class="tc-post-grid">
      <?php while (have_posts()) : the_post(); ?>
        <article <?php post_class('tc-post-card'); ?>>

          <a href="<?php the_permalink(); ?>" class="tc-post-thumb">
            <?php if (has_post_thumbnail()) : ?>
              <?php the_post_thumbnail('medium'); ?>
            <?php else : ?>
              <div class="tc-post-thumb-placeholder"></div>
            <?php endif; ?>
          </a>

          <div class="tc-post-content">

            <div class="tc-post-meta">
              <span class="tc-post-cat">
                <?php
                  $cats = get_the_category();
                  if (!empty($cats)) {
                    echo esc_html($cats[0]->name);
                  }
                ?>
              </span>
              <span class="tc-post-date">
                <?php echo get_the_date(); ?>
              </span>
            </div>

            <h2 class="tc-post-title">
              <a href="<?php the_permalink(); ?>">
                <?php the_title(); ?>
              </a>
            </h2>

            <p class="tc-post-excerpt">
              <?php
                $excerpt_source = has_excerpt()
                  ? get_the_excerpt()
                  : wp_strip_all_tags(get_the_content());

                echo wp_trim_words($excerpt_source, 26, '...');
              ?>
            </p>

          </div>

        </article>
      <?php endwhile; ?>
    </div>

    <nav class="tc-pagination">
      <?php
        the_posts_pagination([
          'mid_size'  => 2,
          'prev_text' => __('이전', 'typecast'),
          'next_text' => __('다음', 'typecast'),
        ]);
      ?>
    </nav>

  <?php else : ?>

    <p class="tc-no-posts">
      아직 이 카테고리에 등록된 글이 없습니다.
    </p>

  <?php endif; ?>

</div>

<?php
get_footer();/* End custom CSS */