WordPress.org

Support

Support » Themes and Templates » Parse error: syntax error, unexpected T_ELSE

Parse error: syntax error, unexpected T_ELSE

  • page.php
    —————————-
    <?php get_header(); ?>
    <div id=”content”>

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

    <div class=”post” id=”post-<?php the_ID(); ?>”>
    <h2><?php the_title(); ?></h2>
    <span class=”post-cat”><?php the_category(‘, ‘) ?></span>
    </div>
    <div class=”entry”>
    <?php the_content(‘<p class=”serif”>Read the rest of this page »</p>’); ?>

    <?php wp_link_pages(array(‘before’ => ‘<p>Pages: ‘, ‘after’ => ‘</p>’, ‘next_or_number’ => ‘number’)); ?>
    </div>

    <?php comments_template(); ?>
    </div>

    <?php endwhile; endif; ?>

    <div class=”navigation”>
    <span class=”previous-entries”><?php previous_post_link(‘%link’)?></span>
    <span class=”next-entries”><?php next_post_link(‘%link’)?></span>
    </div>

    <?php else : ?>

    <h2>Not Found</h2>
    <p>Sorry, but you are looking for something that isn’t here.</p>

    <?php endif; ?>

    </div>
    <!–/content –>

    <?php get_sidebar(); ?>
    <?php get_footer(); ?>

    It says I have an unexpected parse error of T_ELSE on line 26 which is
    <?php else : ?>

    Any help would be great.

Viewing 1 replies (of 1 total)
Viewing 1 replies (of 1 total)
  • The topic ‘Parse error: syntax error, unexpected T_ELSE’ is closed to new replies.