<!-- blog3 --> 
<div class="container is-fluid"> 
  <section class="section blog"> 
    <div class="container"> 
      <div class="columns"> 
        <div class="column"> 
          <h2 class="title">The Pied Piper Blog</h2> 
        </div> 
        <div class="column subtitle"> 
          <?php echo category_description(3);?>     <!------ ID de la catégorie en argument------> 
        </div> 
      </div> 
      <div class="columns"> 
        <?php 
          $args = array( 
            'posts_per_page' => 3, 
            'cat' => 3,         //<!------ ID de la catégorie ------> 
          ); 
          $recent = new WP_Query($args); 
          while($recent->have_posts()) : $recent->the_post(); 
        ?> 
        <div class="column"> 
          <div class="card"> 
            <div class="card-header"> 
              <div class="card-header-title"> 
                <h5 class="subtitle is-5"><?php the_title(); ?></h5> 
              </div> 
              <div class="card-header-icon"> 
                <a href="<?php the_permalink() ?>">See all</a> 
              </div> 
            </div> 
              <div class="card-image"> 
                  <?php if (has_post_thumbnail() ) {?> 
                  <a href="<?php the_permalink() ?>"><?php the_post_thumbnail(); ?></a> 
                  <?php } else { ?> 
                  <?php 
                    $curdir=getcwd(); chdir(get_template_directory() . "/css/img/random/"); 
                    $files=glob("*.{gif,png,jpg,gif}", GLOB_BRACE); 
                    chdir($curdir); 
                    $file=$files[array_rand($files)]; 
                  ?> 
                  <a href="<?php the_permalink() ?>"> 
                  <img src="<?php echo(get_bloginfo('template_url')."/css/img/random/$file"); ?>" alt="<?php bloginfo( 'name' ); ?>" /> 
                  </a> 
                  <?php } ?> 
              </div> 
                <div class="card-content"> 
                  <?php the_excerpt();?> 
                </div> 
          </div> 
        </div> 
        <?php endwhile; ?> 
      </div> 
    </div> 
  </section> 
</div> 
<!-- blog3 -->