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 WordPress Theme Development The WordPress Loop The WordPress Loop Quiz

Andrei Li
Andrei Li
34,486 Points

Quiz 3 of 7. Wordpress. Complete the code for the shorthand Loop below: <?php if( have_posts() ): ( have_posts() ) : th

I am completely stuck. I searched the internet but with zero success. I opened a video where teacher states how it should look like but what is in the middle of the code?

Complete the code for the shorthand Loop below:

<?php if( have_posts() ): ( have_posts() ) : the_post(); ?>
Andrei Li
Andrei Li
34,486 Points

I figured it out: have_posts(), while, the_post().

<?php if( have_posts() ): while ( have_posts() ) : the_post(); ?>