Someone please help!!
-
I keep getting this error when I got o click on the comments option under a post. I’m afraid users are unable to leave comments.
Parse error: syntax error, unexpected ‘<‘ in /home/content/20/7140020/html/wp-content/themes/3d-realty/comments.php on line 145
Please help. My site is http://www.bankmisconduct.com
-
Let me add that I really dont know what I’m doing. Its my first time using wordpress and besides I am pretty much comp illiterate. So, please, if someone could explain a simple way to fix this problem, I would greatly appreciate your help. Thanks.
If you could post the code in wp-content/themes/3d-realty/comments.php to http://wordpress.pastebin.com and give me the link I’ll be happy to show you how to fix it
Oh boy. I don’t think I know how to do that. Could you explain please?
Either
1. connect to your server over FTP
2. browse to wp-content/themes/3d-realty and download the comments.php file
3. open the file in a text editor (notepad is good)
4. select all the text and copy
5. go to http://wordpress.pastebin.com/ and paste the code in the big box
6. click submit and copy the url in your browsers address and paste it in this thread.or
1. with your hosts file manager browse to wp-content/themes/3d-realty and click edit (if you can’t edit from there download the file and do steps 3-6 above)
4. select all the text and copy
5. go to http://wordpress.pastebin.com/ and paste the code in the big box
6. click submit and copy the url in your browsers address and paste it in this thread.Hopefully, this is what you need, I simply copy and pasted the COMMENTS code:
<?php // Do not delete these lines
if (!empty($_SERVER[‘SCRIPT_FILENAME’]) && ‘comments.php’ == basename($_SERVER[‘SCRIPT_FILENAME’]))
die (‘Please do not load this page directly. Thanks!’);if (!empty($post->post_password)) { // if there’s a password
if ($_COOKIE[‘wp-postpass_’ . COOKIEHASH] != $post->post_password) { // and it doesn’t match the cookie
?>
<p class=”nocomments”>This post is password protected.</p>
<?php
return;
}
}//$oddcomment = ‘alt’; /* This variable is for alternating comment background */
?><!– You can start editing here. –>
<?php
if ($comments) : //check normal comment except trackback and pingback
?>
<p class=”commenttitle”><?php comments_number(‘No Responses’, ‘One Response’, ‘% Responses’);?></p><ol class=”commentlist”>
<?php $count = 0;
foreach ($comments as $comment) :
if (get_comment_type() == “comment”) : $count++;
?>
<li id=”comment-<?php comment_ID() ?>”<?php
if(($comment->comment_author_email == get_the_author_email()) && ($comment->user_id != 0) ){
echo ‘ class=”adminbody”><div class=”adminhead”>’;
}else{
echo ‘ class=”commentbody”><div class=”commenthead”>’;
}
echo get_avatar( $comment, 32 );
?>
<div class=”commentcount”><?php echo $count; ?></div>
<span class=”authorlink”><?php comment_author_link() ?></span> <?php comment_type(”, ‘(via Trackback)’, ‘(via Pingback)’); ?>
<span class=””><?php edit_comment_link(‘» Edit «’); ?></span>
<?php
if ($comment->comment_approved == ‘0’) :
?>
(Your comment is awaiting moderation)
<?php
endif;
?>” title=””><?php comment_date(‘l, j. F Y’,’avenue’) ?>
</div>
<?php comment_text() ?><?php
//if (‘alt’ == $oddcomment) $oddcomment = ”; else $oddcomment = ‘alt’; /* Changes every other comment to a different class */
endif;
endforeach; /* end for each comment */ ?><?php
else : // if($comments)====this is displayed if there are no comments so far
if (‘open’ == $post-> comment_status) :
//If comments are open, but there are no comments.
else : //got comments but now comments are closed
?>
<p class=”nocomments”>Comments are closed.</p>
<?php
endif;
endif;
?><?php
if($comments) : //check trackback and pingback
?>
<ol class=”commentlist”>
<?php
foreach ($comments as $comment) :
if((get_comment_type() == “trackback”) || (get_comment_type() == “pingback”)) :
$count++;
?>
<li class=”trackbody” id=”comment-<?php comment_ID() ?>”>
<div class=’trackhead’>
<div class=”commentcount”><?php echo $count; ?></div>
<span class=”authorlink”><?php comment_author_link() ?></span> <?php comment_type(”, ‘(via Trackback)’, ‘(via Pingback)’); ?>
<span class=””><?php edit_comment_link(‘ » Edit «’); ?></span>” title=””><?php comment_date(‘l, j. F Y’,’avenue’) ?>
</div>
<?php comment_text() ?><?php
//if (‘alt’ == $oddcomment) $oddcomment = ”; else $oddcomment = ‘alt’; /* Changes every other comment to a different class */endif;
endforeach; /* end for each comment */
?><?php
else : // this is displayed if there are no comments so far
if (‘open’ == $post->comment_status) :
else : // comments are closed
endif;
endif;
?><?php
if (‘open’ == $post-> comment_status) :
?>
<strong id=”respond”>Leave a Reply<?php
if ( get_option(‘comment_registration’) && !$user_ID ) :
?>
<p class=”login”>You must be logged in to post a comment.</p>
<?php
else :
?>
<form action=”<?php echo get_option(‘siteurl’); ?>/wp-comments-post.php” method=”post” id=”commentform”>
<?php
if ( $user_ID ) :
?>
<p>Logged in as /wp-admin/profile.php”><?php echo $user_identity; ?>. /wp-login.php?action=logout” title=”Log out of this account”>Log out »</p>
<?php
else :
?>
<p><input type=”text” name=”author” id=”author” value=”<?php echo $comment_author; ?>” size=”22″ tabindex=”1″ />
<label for=”author”><small>Name <?php if ($req) echo “(required)”; ?></small></label></p>
<p><input type=”text” name=”email” id=”email” value=”<?php echo $comment_author_email; ?>” size=”22″ tabindex=”2″ />
<label for=”email”><small>E-Mail (will not be published <?php if ($req) echo “, required)”; ?></small></label></p>
<p><input type=”text” name=”url” id=”url” value=”<?php echo $comment_author_url; ?>” size=”22″ tabindex=”3″ />
<label for=”url”><small>Website (optional)</small></label></p>
<?php endif; ?><!–<p><small>XHTML: You can use these tags: <?php echo allowed_tags(); ?></small></p>–>
<p><textarea name=”comment” id=”comment” cols=”50″ rows=”8″ tabindex=”4″></textarea></p>
<p><input name=”submit” type=”submit” id=”submit” tabindex=”5″ value=”Submit” />
<input type=”hidden” name=”comment_post_ID” value=”<?php echo $id; ?>” /></p>
<?php do_action(‘comment_form’, $post->ID); ?>
</form>
<?php
endif; // If registration required and not logged in</font>
?>OK so after looking through the code the only thing I can think might course the error is the last 2 lines. I’d swap them round an see if it spits out another error.
I rearrangd the last two lines and nothing. Any other advice?
At this point no.
With out all the theme files and a good understanding of how the developer coded it, I really can’t do much more.
You should try and contact the developer he/she might know about the problem already and a have a fix.
Sorry.
Thank you for all your help anyway. A cheaper, faster way…lol is to go to a PODADDY BLOGCAST and open up one through them- that way , someone as computer illiterate as myself can have 24/7 support via phone.
Thanks again.
The topic ‘Someone please help!!’ is closed to new replies.