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/articles/news.php
<?php $paged = get_query_var('paged'); query_posts('post_type=post&posts_per_page=15&paged='.$paged); ?>
<?php if (have_posts()): ?>
  <div class="l-lists">
  <?php while (have_posts()): the_post(); ?>
    <?php
      $cat = get_the_category(); $cat = $cat[0];
      $img = get_field('news_list_thumbnail');
      $imgurl = wp_get_attachment_image_src($img, '3-2');
    ?>
    <article class="table_article m_article_news" alt="<?php the_permalink(); ?>">
      <a href="<?php the_permalink() ?>">
        <div class="cover-outer">
          <div class="cover m-outer-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 } ?>
            <span class="cat">
              <?php
                $category = get_the_category();
                $fixed_cat_name = $category[0]->cat_name;
                $fixed_cat_name = str_replace('(古)', '', $fixed_cat_name);
                echo $fixed_cat_name;
              ?>
            </span>
          </div>
        </div>
        <div class="cnt">
          <aside class="info">
            <time><?php the_time('Y/m/d') ?></time>
          </aside>
          <h1>
            <?php if(mb_strlen($post->post_title)>40) {
              $title= mb_substr($post->post_title,0,40);
              echo $title.'...';
            } else {
              the_title();
            }?>
          </h1>
          <p><?php the_excerpt(); ?></p>
        </div>
      </a>
    </article>
  <?php endwhile; ?>
  </div>
<div class="pagination"><?php wp_pagination(); ?></div>
<?php endif; ?>
<?php wp_reset_query(); ?>