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 trialPhilippe GEFFE
2,746 PointsThe "row" trick end up opening an empty row ?
I found the row trick clever. In this example I suppose that after the 8th portfolio piece, this loop will open a new (empty) row (?) Is there a way to detect when the last post is processed in the loop and just put a closing </div> and not a </div><div class="row"> ?
2 Answers
Jason Anello
Courses Plus Student 94,610 PointsHi Philippe,
You're correct. If your portfolio pieces are a multiple of 4 then you'll end up getting an empty row div at the end.
I answered a similar previous question here: https://teamtreehouse.com/community/the-row-trick-in-wordpress-course-imperfect which should help you out.
Philippe GEFFE
2,746 PointsThanks Jason ! Your solution works perfectly. I didn't seen the similar question. Sorry for that !