Menu icon Foundation

My Posts

No Content

My Comments

Drew Miller commented on Chris M's post over 2 years

Great post!  It was a big help :).  Here is an updated version for Foundation 6:
 
<div class="row small-up-2 medium-up-3 large-up-4">
<?php // Query latest blog items
$args = array(
'post_type' => 'post', //Regular posts
'posts_per_page' => 4
);
$blog_query = new WP_Query ( $args );

// Start the loop
if ( $blog_query-&gt;have_posts() ) : while ( $blog_query-&gt;have_posts() ) : $blog_query-&gt;the_post(); ?&gt;
  &lt;div class="column column-block"&gt;
    &lt;a href="&lt;?php the_permalink();?&gt;"&gt;&lt;?php the_post_thumbnail(); ?&gt;
    &lt;h5&gt;&lt;?php the_title(); ?&gt;&lt;/a&gt;&lt;/h5&gt;
    &lt;?php the_excerpt(); ?&gt;
  &lt;/div&gt;

  &lt;?php endwhile;
    //Reset the loop
    wp_reset_postdata();
  else: // When no posts have been found ?&gt;

  &lt;p&gt;&lt;?php _e( 'Sorry no posts found.' ); ?&gt;&lt;/p&gt;

<?php endif; ?>
</div> <!-- end row -->

Posts Followed


Following

    No Content

Followers

My Posts

No Content

My Comments

You commented on Chris M's post over 2 years

Great post!  It was a big help :).  Here is an updated version for Foundation 6:
 
<div class="row small-up-2 medium-up-3 large-up-4">
<?php // Query latest blog items
$args = array(
'post_type' => 'post', //Regular posts
'posts_per_page' => 4
);
$blog_query = new WP_Query ( $args );

// Start the loop
if ( $blog_query-&gt;have_posts() ) : while ( $blog_query-&gt;have_posts() ) : $blog_query-&gt;the_post(); ?&gt;
  &lt;div class="column column-block"&gt;
    &lt;a href="&lt;?php the_permalink();?&gt;"&gt;&lt;?php the_post_thumbnail(); ?&gt;
    &lt;h5&gt;&lt;?php the_title(); ?&gt;&lt;/a&gt;&lt;/h5&gt;
    &lt;?php the_excerpt(); ?&gt;
  &lt;/div&gt;

  &lt;?php endwhile;
    //Reset the loop
    wp_reset_postdata();
  else: // When no posts have been found ?&gt;

  &lt;p&gt;&lt;?php _e( 'Sorry no posts found.' ); ?&gt;&lt;/p&gt;

<?php endif; ?>
</div> <!-- end row -->

Posts Followed

Following

  • No Content

Followers

  • No Content