WordPress.org

Ready to get started?Download WordPress

Forums

Help installing my new theme - parse error (4 posts)

  1. shanest
    Member
    Posted 9 years ago #

    I have the following error for my index.php file:
    Parse error: parse error, unexpected $ in /home/shanest/public_html/wp-content/themes/shanest/index.php on line 20
    Here's the index.php file:
    <?php include "header.php"; ?>
    <?php if (have_posts()) : ?>
    <?php while (have_posts()) : the_post(); ?>
    <div class="headline">" rel="bookmark" title="Permanent Link to <?php the_title(); ?>"><?php the_title(); ?></div>
    <div class="subheadline">Posted to <?php the_category(', ') ?> at <?php the_time('g:i A') ?> on <? the_date(); ?></div>

    <div class="story">
    <?php the_content('Read the rest of this entry »'); ?>
    </div>
    <div class="storyfoot">
    Discuss in Forum | ">Trackback
    </div>
    <?php endwhile; ?>
    <?php include "searchform.php"; ?>
    <?php include "footer.php"; ?>
    Any idea why it's got a parse error?

  2. shanest
    Member
    Posted 9 years ago #

    Updated index.php returns identical parse error except on line 24. Also, whenever I try and just delete the bottom include, the error shifts up to the line above.
    <?php include "header.php"; ?>
    <?php if (have_posts()) : ?>
    <?php while (have_posts()) : the_post(); ?>
    <div class="headline">" rel="bookmark" title="Permanent Link to <?php the_title(); ?>"><?php the_title(); ?></div>
    <div class="subheadline">Posted to <?php the_category(', ') ?> at <?php the_time('g:i A') ?> on <? the_date(); ?></div>

    <div class="story">
    <?php the_content('Read the rest of this entry »'); ?>
    </div>
    <div class="storyfoot">
    <?
    $forum = mysql_query("SELECT * FROM wp_categories WHEN ID=the_category_ID();");
    $forum_id = mysql_fetch_array($forum);
    ?>
    Discuss in "><? the_category_unicode(); ?> Forum
    </div>
    <?php endwhile; ?>
    <?php include "searchform.php"; ?>
    <?php include "footer.php"; ?>

  3. Mark (podz)
    Support Maven
    Posted 9 years ago #

    I would guess that the error is not in index.php, but is actually in one of the other files that you are including.

  4. shanest
    Member
    Posted 9 years ago #

    It was just a : that shouldn't have been there, sorry for the trouble.

Topic Closed

This topic has been closed to new replies.

About this Topic

Tags

No tags yet.