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 trialJeffrey Cunningham
5,592 PointsGetting unexpected end of file error on line 27 of this code.
I'm getting this error.
Parse error: syntax error, unexpected end of file in /Users/jeff/Documents/Websites/www.sandbox.dev/wp-content/themes/treehouse-portfolio/index.php on line 27
for this code:
<?php get_header(); ?>
<?php if ( have_posts() ) : while ( have_posts() ) : the_post(); ?>
<section class="row"> <div class="small-12 columns text-center"> <div class="leader">
<?php if ( have_posts() ) : while ( have_posts() ) : the_post(); ?>
<h1><?php the_title(); ?></h1>
<p><?php the_content(); ?></p>
<?php endwhile; else : ?>
<p><?php _e( 'Sorry, no posts matched your criteria.' ); ?></p>
<?php endif; ?>
</div>
</div>
</section>
<?php get_footer(); ?>
2 Answers
Jeffrey Cunningham
5,592 PointsNever mind, I got the answer. But could someone tell me how to properly insert code into these text boxes. My question above left the whole section of code out where the error occurred.
George Boyd
1,402 PointsJeffrey, could you share your answer?
Zac Gordon
Treehouse Guest TeacherZac Gordon
Treehouse Guest TeacherCheck this out on tips for posting up code :)
https://teamtreehouse.com/community/posting-code-to-the-forum