Parse Error On New WP Theme

1 replies
  • WEB DESIGN
  • |
So I am not sure what is causing this. I am new to making wordpress themes by the way.

I am getting this error: Parse error: syntax error, unexpected $end. The error comes from my index file on line 34 it says. How do I fix this? Here is the index code:

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

<div id="MainContainer">
<div class="ContentContainer">
<div class="HorizonNagigation">
<?php wp_nav_menu( array( 'theme_location' => 'horizonal-header-menu' ) ); ?>
</div>
</div>
<div class="ContentBoxMain1">
<h1><?php wp_title(); ?></h1><br>

<?php the_content(); ?>

</div>
<div class="ContentBoxMain2">
<?php if ( !function_exists('dynamic_RightBar')
        || !dynamic_RightBar() ) : ?>


<?php endif; ?>
</div>


</div>


<?php get_footer(); ?>
<?php endwhile; ?>
#error #parse #theme
  • Profile picture of the author Nathan K
    You forgot to close the first if statement. Place <?php endif; ?> after the <?php endwhile; ?>.
    {{ DiscussionBoard.errors[10128127].message }}

Trending Topics