• Resolved Cyril W

    (@cyril-w)


    Whenever i am trying to access my wordpress blog I am getting this error. Not sure what it means? Have tried approaching Godaddy for support but they said its a scripting error and hence they cant help. Can anyone let us know how to resolve this error?

    “Parse error: syntax error, unexpected ‘<‘ in D:\Hosting\7440377\html\index.php o”

    Here is my index.php code in case anyone looking for reference

    <?php get_header(); ?>
    
    	<div id="content" class="narrowcolumn">
    
    	<?php if (have_posts()) : ?>
    
    		<?php while (have_posts()) : the_post(); ?>
    
    			<div class="post" id="post-<?php the_ID(); ?>">
    				<div class="postdate"><?php the_time('F jS, Y') ?> <!-- by <?php the_author() ?> --></div>
    				<h2><a>" rel="bookmark" title="Permanent Link to <?php the_title(); ?>"><?php the_title(); ?></a></h2>
    				<div class="postentry"><?php the_content('Read the rest of this entry »'); ?></div>
    				<div class="postmetadata">
    					<?php the_tags(); ?>
    					Posted in <?php the_category(', ') ?> | <?php edit_post_link('Edit', '', ' | '); ?>  <?php comments_popup_link('No Comments »', '1 Comment »', '% Comments »'); ?></div>
    			</div>
    
    		<strong><?php endwhile; ?></strong>
    
    		<div class="navigation">
    			<div class="alignleft"><?php next_posts_link('« Previous Entries') ?></div>
    			<div class="alignright"><?php previous_posts_link('Next Entries »') ?></div>
    		</div>
    
    	<?php else : ?>
    
    		<h2 class="center">Not Found</h2>
    		<p class="center">Sorry, but you are looking for something that isn't here.</p>
    		<?php include (TEMPLATEPATH . "/searchform.php"); ?>
    
    	<?php endif; ?>
    
    	</div>
    
    <?php get_sidebar(); ?>
    
    <?php get_footer(); ?>

    [please remember to mark any posted code – http://codex.wordpress.org/Forum_Welcome#Posting_Code – the above posted code is already broken by the forum parser]

Viewing 5 replies - 1 through 5 (of 5 total)
  • Andrew Nevins

    (@anevins)

    WCLDN 2018 Contributor | Volunteer support

    Just post the line the error’s referring to.

    Thread Starter Cyril W

    (@cyril-w)

    It is in bold above still posting it again
    <?php endwhile; ?>

    ideally, re-post the code by pasting it into a http://pastebin.com/ and posting the link to it here; http://codex.wordpress.org/Forum_Welcome#Posting_Code

    what is the full exact text of the error message?

    Hi There.

    It might be line 11.
    You’ve closed the A tag without wrapping the rel or title.

    I think what you wanted was this. <a rel="bookmark" title="Permanent Link to <?php the_title(); ?>">

    Cheers

    Thread Starter Cyril W

    (@cyril-w)

    Thanks you all for the reply!

    Nothing worked so I have taken little extra pain and took the following steps after taking the back up

    1. Removed all folders except wp-content
    2. Downloaded a fresh version of wordpress
    3. Uploaded all files except wp-content
    4. Updated wp-config file

    And its back. Blog is working fine now.

Viewing 5 replies - 1 through 5 (of 5 total)

The topic ‘Parse error: syntax error, unexpected '’ is closed to new replies.