Welcome to the Treehouse Community

The Treehouse Community is a meeting place for developers, designers, and programmers of all backgrounds and skill levels to get support. Collaborate here on code errors or bugs that you need feedback on, or asking for an extra set of eyes on your latest project. Join thousands of Treehouse students and alumni in the community today. (Note: Only Treehouse students can comment or ask questions, but non-students are welcome to browse our conversations.)

Looking to learn something new?

Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and a supportive community. Start your free trial today.

WordPress

Jonathan Seligsohn
Jonathan Seligsohn
23,116 Points

How to Build WordPress Theme, Stage 3: WP Theme Functions - SERVER ERROR

I've been following along these great tutorials about wordpress, but now I'm stuck. I'm running a test WP site on my local server (as directed by the tutorials). I just added the following code to the file front-page.php:

<?php get_header(); ?>
<p>This is the front-page.php file.</p>

<?php if ( have_posts() ) : while ( have_posts() ) : the_post(); ?>
    <h3><?php the_title(); ?></h3>
    <?php the_content(): ?>
    <hr> 

<?php endwhile; else: ?>

    <p>There are no posts.</p>
<?php endif; ?>

<?php get_footer(); ?>

When I go to Visit Site, I get an HTML 500 error - Server Error.

What's the problem?

Other info: Other than the basic theme info, my style.css is blank. But even when I use a different style.css, I still get an error.

Jonathan Seligsohn
Jonathan Seligsohn
23,116 Points

Figured it out: It would seem that instead of a semicolon, I had just a colon.

1 Answer