• Hi,
    Getting this error: Parse error: syntax error, unexpected T_ELSE in /home/content/66/5731066/html/stopforlife/wp-content/themes/Extracted Blogsite Theme Files/single.php on line 43

    Searched here and found similar parse errors, but not from single.php.
    Not sure when error started, but only noticed it after creating new standard post.
    This post was created in response to another post and I used “trackback and pings” for the first time:
    http://indyposted.com/25262/russell-crowe-has-stop-smoking-crutches/comment-page-1/#comment-6004
    I don’t know if that’s what messed up. It’s not something I understand or know how to “undo” or delete.

    Before that I’d added 2 new plug ins Google maps & SEO all in one. Deactivated each but made no difference.
    Biz Partner had also been uploading to Media Library.
    problematic code:

    <?php get_header(); ?>
    
    <!-- BEGIN content -->
    <div id="content">
    
    	<?php
    	if (have_posts()) : the_post();
    	?>
    
    	<!-- begin post -->
    	<div class="single">
    
    		<h2><?php the_title(); ?></h2>
    		<p class="details">
    		<?php the_time('F j, Y') ?> |
    		<?php the_category(', ') ?>
    		</p>
    		<div class="break"></div>
    		<?php echo the_content(); ?>
    		<p class="tags">Tags: <?php the_tags('', ', ', ''); ?></p>
    
    	</div>
    	<!-- end post -->
    
    	<div id="comments">
    	<?php comments_template(); ?>
    	</div>
    
    	<?php else : ?>
    	<div class="notfound">
    		<h2>Not Found</h2>
    		<p>Sorry, but you are looking for something that is not here.</p>
    	</div>
    	<?php endif; ?>
    
    </div>
    <!-- END content -->
    
    <?php get_sidebar(); get_footer(); ?>
    
    	</div>
    
    	<?php else : ?>
    	<div class="notfound">
    		<h2>Not Found</h2>
    		<p>Sorry, but you are looking for something that is not here.</p>
    	</div>
    	<?php endif; ?>
    
    </div>
    <!-- END content -->
    
    <?php get_sidebar(); get_footer(); ?>

    Any help very much appreciated.
    Thanks

Viewing 2 replies - 1 through 2 (of 2 total)
  • You have a duplicated section of code at the end of the file. Remove everything below the first get_sidebar() line:

    Change this:

    <?php get_sidebar(); get_footer(); ?>
    
    	</div>
    
    	<?php else : ?>
    	<div class="notfound">
    		<h2>Not Found</h2>
    		<p>Sorry, but you are looking for something that is not here.</p>
    	</div>
    	<?php endif; ?>
    
    </div>
    <!-- END content -->
    
    <?php get_sidebar(); get_footer(); ?>

    to this:

    <?php get_sidebar(); get_footer(); ?>

    I just revise some in the code and its already mess up, it say:

    Parse error: syntax error, unexpected T_ELSE in /home/content/93/7929093/html/wp-content/themes/platformpro/sections/section.footer_nav.php on line 42

    And i cant access anymore to my blog http://christian-marriage-retreats.org

    Please i need your help man..

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