Welcome to the Treehouse Community

Want to collaborate on code errors? Have bugs you need feedback on? Looking for an extra set of eyes on your latest project? Get support with fellow developers, designers, and programmers of all backgrounds and skill levels here with the Treehouse Community! While you're at it, check out some resources Treehouse students have shared here.

Looking to learn something new?

Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and join thousands of Treehouse students and alumni in the community today.

Start your free trial

WordPress

Carl Sergile
Carl Sergile
16,570 Points

How to start a new row. WordPress with Bootstrap Video, but Im using Skeleton Boilerplate!

Hey saw this video a while back where Zac started a new row after he was done dynamically inputting portfolio pieces using the loop. I can't seem to quite find that video now, if anyone knows how to do this, any help would be great!

also does anyone know if I can change the $query to any variable I like or is $query my best bet here?

My code:

div class="row blue main" id="portfolio">
div class="container">
  <div class="twelve columns">
      <h2 style="text-align: center;">Portfolio</h2>
      <hr>
    </div>
<?php
$args = array(
  'category_name' => 'portfolio'
);
$query = new WP_Query( $args );
?>

<div class="row main">
  <?php if( $query->have_posts() ): while( $query->have_posts() ): $query->the_post(); ?>
    <div class="six columns" style="text-align:center;">
      <?php the_post_thumbnail('medium'); ?>
        <div><?php the_content();?></div>
    </div>
  <?php endwhile; endif; wp_reset_postdata(); ?>