Support » Themes and Templates » 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 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’)); ?>

    <?php comments_template(); ?>

    <?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>

    <?php else : ?>

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

    <?php endif; ?>

    <!–/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.