Viewing 7 replies - 1 through 7 (of 7 total)
  • Can’t access the page (from here). Can you tell us what the parse error actually said, and post line 53 here in a reply?

    Thread Starter 7784

    (@7784)

    My site was down for an hour or so, should be okay now but just incase…

    “Parse error: parse error, unexpected ‘}’ in /home/co7784/public_html/index.php on line 53”

    And the code…

    <?php if (empty($_GET["cat"]) and empty($_GET["category_name"]) and empty($_GET["m"]) and empty($_GET["s"]) and empty($_GET["paged"]) and empty($_GET["year"]) and empty($_GET["monthnum"]) and empty($_GET["day"])) {
    if ((! $withcomments) && (! $single)) { ?>

    <div id="content" class="multipost">

    <?php if ($posts) : foreach ($posts as $post) : start_wp(); ?>
    <div class="post">
    <div class="title" id="post-<?php the_ID(); ?>"><a href="<?php the_permalink() ?>" rel="bookmark" title="<?php the_title(); ?>"><?php the_title(); ?></a> (<?php comments_popup_link("0", "1", "%"); ?> <?php edit_post_link("edit","/ ",""); ?> / <?php the_category(", ") ?>)</div>
    <div class="entry">
    <?php the_content("Read in Full"); ?>
    <small>By <b><a href="mailto:<?php the_author_email(); ?>" title="Email <?php the_author() ?>"><?php the_author() ?></a></b> (<?php the_time("F jS, Y") ?>)</small>
    </div>

    </div>
    <br/>

    <hr /> <?php endforeach; ?>

    <?php } else { ?> // << LINE 53
    <h2>post not found</h2>
    Sorry, i couldn"t find the post you were looking for. I"ve either moved/deleted/renamed it or you"ve followed an out of date link.

    <ul>
    <li><a href="javascript:window.history.go(-1)">Return to the previous page</a></li>
    <li><a href="/">Go to the home page</a></li>
    <li><a href="mailto:[email protected]">Contact the webmaster</a></li>
    </ul>
    <br/>
    <?php } ?>
    </div><? } } // End Frontpage ?>
    <? // Begin Permalinks ?>

    Change line 53 to:

    <?php else : ?>

    It’s just using a different coding style, originating from <?php if ($posts) :

    Thread Starter 7784

    (@7784)

    Doing that results in an error on line 63 <?php } ?>. That’s what i don’t understand, it’s always been <?php } else { ?> on line 53, i’ve not changed anything in the template to make it suddenly break.

    Thread Starter 7784

    (@7784)

    https://www.7784.co.uk/code.phps – my whole index file, incase im missing something, it’s the code from Kubrick if that makes any difference?

    “Doing that results in an error on line 63 <?php } ?>”

    Change that to:

    <?php endif; ?>

    I can’t explain the why, but something did change, since you’re using 1.5’s Loop format, but ending the if statement sections the way it does in 1.2. If you look further down your index.php in the <div id="content" class="singlepost"> section, you’ll see this.

    Thread Starter 7784

    (@7784)

    That did it, thanks ??

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