• Resolved rense

    (@rense)


    I was hoping if someone could tell me why I am getting this error:
    “Parse error: syntax error, unexpected T_VARIABLE in /home/allirens/public_html/testblog/wp-content/themes/hacdc/index.php on line 9”

    I can’t see anything with the syntax that jumps out at me as being wrong. Here is my index.php code:

    <?php get_header(); ?>
    <div id="sidebar">
    <?php get_sidebar(); ?>
    </div>
    <div id="entries">
    <?php if ( have_posts() ) : while ( have_posts() ) : the_post(); ?>
    <?php the_title(); ?>
    <?php the_content('Continue Reading'); ?>
    Posted on <?php the_time('F jS, Y') ?> by <?php the_author() ?>. <a href="<?php the_permalink() ?>" rel="bookmark" title="Permanent Link to <?php the_title(); ?>">link</a>.<br />
    Tags: <?php$posttags = get_the_tags();if ($posttags) {foreach($posttags as $tag) {echo $tag->name . ' '; }}?>
    <?php endwhile; else: ?>
    <p><?php _e('Sorry, no posts matched your criteria.'); ?></p>
    <?php endif; ?>
    <?php get_footer(); ?>

    Thanks!

Viewing 2 replies - 1 through 2 (of 2 total)
  • This doesn’t look OK:
    <?php$posttags
    shouldn’t there be a space between php and the rest?

    Thread Starter rense

    (@rense)

    I’m not sure what was wrong–that could have been it. I just redid the page and it’s fine now.

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