<!-- Blog version 2--> 
<section class="section blog"> 
  <div class="container"> 
  <h2 class="title has-text-centered">Some of our awesome actu !</h2> 
    <div class="columns is-centered"> 
      <?php 
        $args = array( 
          'posts_per_page' => 2, 
        ); 
        $recent = new WP_Query($args); 
        while($recent->have_posts()) : $recent->the_post(); 
      ?> 
      <div class="column is-4"> 
        <article> 
            <div class="card"> 
              <div class="card-image"> 
                <?php if (has_post_thumbnail() ) {?> 
                <picture> 
                  <?php the_post_thumbnail(); ?> 
                </picture> 
                <?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)]; 
                ?> 
                <picture> 
                  <img src="<?php echo(get_bloginfo('template_url')."/css/img/random/$file"); ?>" alt="<?php bloginfo( 'name' ); ?>" /> 
                </picture> 
                <?php } ?> 
              </div> 
              <div class="card-content"> 
                <h1 class="title is-spaced is-4 has-text-centered"> 
                  <?php the_title(); ?> 
                </h1> 
                <div> 
                  <p class="subtitle is-6 has-text-centered"><?php the_excerpt();?></p> 
                  <p class="has-text-centered" ><a href="<?php the_permalink(); ?>">Read more</a></p> 
                </div> 
              </div> 
            </div> 
        </article> 
      </div><!-- /column --> 
      <?php endwhile; ?> 
    </div><!-- /columns --> 
  </div><!-- /container --> 
</section> 
<!-- /blog version 2-->