<html <?php echo get_language_attributes(); ?>>
<?php echo $__env->make('partials.head', array_except(get_defined_vars(), array('__data', '__path')))->render(); ?>
<body id="category" <?php body_class() ?>>
<div class="pacewrap">

  <div id="container">
  <?php echo $__env->make('partials.header', array_except(get_defined_vars(), array('__data', '__path')))->render(); ?>

   <article class="mt-md-5 pt-md-5">
    <section class="main">

      <div class="row plr-0 col-12 col-md-10 offset-md-1 pb-5">
        <div class="container">


          <header class="post_titlearea">
            <div class="container clearfix d-flex align-items-center">
              <h1 class="en float-left">News<!-- <?php the_title(); ?> --></h1>

              <select class="news_select selectpicker float-left en" onChange="location.href=value;">
                <option class="check_cat" selected name="cat" value="news">All News</option>
                <option class="check_cat" <?php $url = $_SERVER['REQUEST_URI'];if(strstr($url,'filter=news')==true){echo "selected";} ?> name="cat" value="<?php echo e(home_url('/news?filter=news')); ?>">お知らせ</option>
                <option class="check_cat" <?php $url = $_SERVER['REQUEST_URI'];if(strstr($url,'press-release')==true){echo "selected";} ?> name="cat" value="<?php echo e(home_url('/news?filter=press-release')); ?>">ニュースリリース</option>
              </select>

            <div class="news_search float-right ml-auto">
               <?php echo get_search_form(); ?>

            </div>

            </div>

          </header>

          <div id="latest_news" class="mt-md-0 border-bottom-0">
            <ul id="result" class="row post_row">
              <!-- ここに投稿を表示 -->
                <?php if(have_posts()): while(have_posts()):the_post();$rankcount++; ?>
                  <li class="col-3 post_box">
                    <a href="<?php echo e(get_permalink()); ?>" class="thumbnail">
                      <?php if(has_post_thumbnail()): ?>
                        <?php the_post_thumbnail( 'thumb-square', array('class' => 'img-fluid') ); ?>
                      <?php else: ?>
                        <img src="<?= App\asset_path('images/notfound.jpg'); ?>" alt="RECALM" class="img-fluid" />
                      <?php endif; ?>
                    </a>
                    <time class="en"><?php echo e(get_the_date()); ?></time>  -  <span class="ctegory"><?php categories_label(); ?></span>
                    <h2><a href="<?php echo e(get_permalink()); ?>"><?php echo get_the_title(); ?></a></h2>
                  </li>
                  <?php if ($rankcount == $number ): ?>
                    <hr class="w-100 mb-5 pb-3">
                  <?php endif; ?>
                <?php endwhile;endif; ?>
            </ul>

            <div id="pagination">
              <?php the_pagination();?>
            </div>
              <!-- <div id="pagination" class="text-right">
                <div class="clearfix text-right">
                  <?php
                    if ($the_query->max_num_pages > 1) {
                      echo paginate_links(array(
                      'base' => get_pagenum_link(1) . '%_%',
                      'format' => 'page/%#%/',
                      'current' => max(1, $paged),
                      'total' => $the_query->max_num_pages,
                      'prev_text' => '&larr;',
                      'next_text' => '&rarr;'
                      ));
                    }
                  ?>
                </div>
              </div> -->

           </div>

    </section>
  </article>


  <?php do_action('get_footer') ?>
  <?php echo $__env->make('partials.footer', array_except(get_defined_vars(), array('__data', '__path')))->render(); ?>
  <?php wp_footer() ?>

</div>

</body>
</html>
