I am trying to code the index.php but run some for some errors. I am trying to list down blogs from scratch and inserted the post links of WordPress codec.

Here is my WordPress code for index file.

<?php get_header(); ?>
<!-- BLOG AREA -->
        <hr class="no-margin" />
        <div class="blog-container section-content">
            <div class="container">
            <?php if (have_posts()) : ?>
                <div class="row">
                <?php while(have_posts()) : the_post(); ?>
            <div class="col-md-8">
                <ul class="negative-margin">
                            <h1><a href="<?php the_permalink(); ?>">" class="gray"><?php the_title(); ?></a></h1>
                            <p class="details">By <a href="#">Sam Norton</a> / On July 20, 2014 / <a href="#">Life Hacks</a></p>
                                <?php if (has_post_thumbnail()) : ?>
                                        <a href="<?php the_permalink(); ?>"><img class="opacity-hover box-layer img-responsive" src="<?php the_post_thumbnail(); ?>" alt="" /></a>
                            <p class="excerpt">Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum
                            <div class="btn-margin">
                                <a href="<?php the_permalink(); ?>">" class="btn btn-primary">CONTINUE READING >>> </a>
                            <?php endif; ?>
                            <?php endwhile; ?>
                <div class="box-layer align-center page-nav">
                        <a href="#" class="btn">Next Page >>> </a>
            <?php get_sidebar(); ?>
<?php get_footer(); ?>

Then I got the following errors:

Parse error: syntax error, unexpected end of file in C:xampphtdocsthemewpwp-contentthemesneoblogindex.php on line 51

Any idea what’s causing this error? I tried to tweak it but find no luck. thanks for help in advance.

Read more here: WordPress index.php not working


If you know the solution of this issue, please leave us a reply in Comment section, to update the question.

Related Wordpress search:

, ,

Wordpress related questions and answers: