• Resolved whiteduck

    (@whiteduck)


    I have been following a book “WordPress 3 site blueprints” but have parse errors on page.php and single.php
    The error message is
    Parse error: syntax error, unexpected $end in wp-content/themes/retroTheme/page.php on line 17 (Line 17 is the last line)

    The code for the page is:
    <?php get_header(); ?>
    <!–begin main content–>
    <div id=”content”>
    <?php if (have_posts()) : ?>
    <?php while (have_posts()) : the_post(); ?>
    <div id=”post-<?php the_ID(); ?>”><?php the_title(); ?></div>
    Posted in <?php the_category(‘, ‘) ?> by <?php the_author() ?> on <?php the_time(‘F jS, Y’) ?>
    | <?php edit_post_link(‘Edit’, ”, ‘ | ‘); ?>
    <?php comments_popup_link(‘No Comments’, ‘1 Comment’, ‘% Comments’); ?>

    <?php the_content(‘ ‘); ?>
    <?php comments_template(); ?>
    <?php endwhile; ?>
    <!–end main content–>
    </div>
    <?php get_sidebar(); ?>
    <?php get_footer(); ?>

    thanks WD

Viewing 2 replies - 1 through 2 (of 2 total)
  • your code is missing the corresponding </php endif; ?> for the line <?php if (have_posts()) : ?>

    last few lines rewritten:

    <?php endwhile; ?>
    <!--end main content-->
    </php endif; ?>
    </div>
    <?php get_sidebar(); ?>
    <?php get_footer(); ?>
    Thread Starter whiteduck

    (@whiteduck)

    thanks so much
    much appreciated
    cheers WD

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘parse error’ is closed to new replies.