Problems with theme in Wordpress blog, need help.

Discussion in 'WordPress' started by DanPonjican, Jun 11, 2008.

  1. #1
    DanPonjican, Jun 11, 2008 IP
  2. System0

    System0 Well-Known Member

    Messages:
    168
    Likes Received:
    13
    Best Answers:
    0
    Trophy Points:
    128
    #2
    Have you been editing the comments template?

    my advice would be to revert to the default comments.php template for that theme. If the default template is causing this then clearly the theme is messed up

    let me know if you have any problems

    kevin
     
    System0, Jun 11, 2008 IP
  3. DanPonjican

    DanPonjican Active Member

    Messages:
    268
    Likes Received:
    5
    Best Answers:
    0
    Trophy Points:
    80
    #3
    Yes I have been editing it, but I already reverted it back to the original code but I am still having the same problem.
     
    DanPonjican, Jun 11, 2008 IP
  4. arwen54

    arwen54 Active Member

    Messages:
    632
    Likes Received:
    23
    Best Answers:
    0
    Trophy Points:
    60
    #4
    that's really strange...I copied your code into my editor and I can not see the error....

    Have you tried contacting the theme designer? Your only other option is to use another theme...the theme you are using is possibly not compatible with your version of WordPress...

    that does happen sometimes, unfortunately
     
    arwen54, Jun 11, 2008 IP
  5. susan8051

    susan8051 Peon

    Messages:
    1,358
    Likes Received:
    49
    Best Answers:
    0
    Trophy Points:
    0
    #5
    it is because you haven't close a php if

    may be see this code i have closed the php ifs.. not too sure about the closing.. find out which if is to be closed and where it should be closed..

    this code should work for you..but do correct it...
    
    <?php // Do not delete these lines
    	if ('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. Enter the password to view comments.<p>
    
    				<?php
    				return;
                }
            }
    
    		/* This variable is for alternating comment background */
    		$oddcomment = 'odd';
    ?>
    
    <!-- You can start editing here. -->
    
    <?php if ($comments) : ?>
    
    <?php 
    
    	/* Count the totals */
    	$numPingBacks = 0;
    	$numComments  = 0;
    
    	/* Loop through comments to count these totals */
    	foreach ($comments as $comment) {
    		if (get_comment_type() != "comment") { $numPingBacks++; }
    		else { $numComments++; }
    	}
    
    ?>
    
    <?php 
    
    	/* This is a loop for printing comments */
    	if ($numComments != 0) : ?>
    	<h3 id="comments"><?php comments_number('No Comments', 'One Comment', '% Comments' );?> on “<?php the_title(); ?>”</h3> 
    
    	<ol class="commentlist">
    
    	<?php foreach ($comments as $comment) : ?>
    
    		<li class="<?php echo $oddcomment; ?>" id="comment-<?php comment_ID() ?>">
    			<cite><?php comment_author_link() ?></cite> |<span class="postmeta"><a href="#comment-<?php comment_ID() ?>" title="">
    			<?php comment_date('F jS, Y') ?>
    at
    <?php comment_time() ?>
    			</a>
                <?php edit_comment_link('edit','',''); ?>
    			</span>
    		  <?php if ($comment->comment_approved == '0') : ?>
    			<em>Your recent comment is awaiting moderation!</em>
    			<?php endif; ?>
    			<br />
    			<?php comment_text() ?>
    		</li>
    
    	<?php /* Changes every other comment to a different class */
    		if ('alt' == $oddcomment) $oddcomment = '';
    		else $oddcomment = 'alt';
    	?>
    
    	<?php endforeach; /* end for each comment */ ?>
    	</ol>
    
     <?php else : // this is displayed if there are no comments so far ?>
    
      <?php if ('open' == $post->comment_status) : ?>
    		<!-- If comments are open, but there are no comments. -->
    
    	 <?php else : // comments are closed ?>
    		<!-- If comments are closed. -->
    		<p class="nocomments">Comments are closed now!</p>
    
    	    <?php endif; ?>
    <?php endif; ?>
    
    <?php if ('open' == $post->comment_status) : ?>
    
    <h3 id="respond">Leave a Reply</h3>
    
    <?php if ( get_option('comment_registration') && !$user_ID ) : ?>
    <p>You must be <a href="<?php echo get_option('siteurl'); ?>/wp-login.php?redirect_to=<?php the_permalink(); ?>">logged in</a> 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 <a href="<?php echo get_option('siteurl'); ?>/wp-admin/profile.php"><?php echo $user_identity; ?></a>. <a href="<?php echo get_option('siteurl'); ?>/wp-login.php?action=logout" title="Log out of this account">Logout &raquo;</a></p>
    
    <?php else : ?>
    
    <p><input type="text" name="author" id="author" value="<?php echo $comment_author; ?>" size="22" tabindex="1" />
    <label for="author">Name <?php if ($req) echo "(required)"; ?></label></p>
    
    <p><input type="text" name="email" id="email" value="<?php echo $comment_author_email; ?>" size="22" tabindex="2" />
    <label for="email">Email (will not be published) <?php if ($req) echo "(required)"; ?></label></p>
    
    <p><input type="text" name="url" id="url" value="<?php echo $comment_author_url; ?>" size="22" tabindex="3" />
    <label for="url">Blog or Website </label>
    </p>
    
    <?php endif; ?>
    <?php endif; ?>
    
    
    <p>
      <textarea name="comment" id="comment" cols="100%" rows="10" tabindex="4"></textarea>
    </p>
    <p><input name="submit" type="submit" id="submit" tabindex="5" value="Submit Comment" />
    <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 ?>
    
    <?php endif; // if you delete this the sky will fall on your head ?>
    Code (markup):
     
    susan8051, Jun 11, 2008 IP
  6. DanPonjican

    DanPonjican Active Member

    Messages:
    268
    Likes Received:
    5
    Best Answers:
    0
    Trophy Points:
    80
    #6
    That worked susan! Thank you so much.
     
    DanPonjican, Jun 12, 2008 IP
  7. susan8051

    susan8051 Peon

    Messages:
    1,358
    Likes Received:
    49
    Best Answers:
    0
    Trophy Points:
    0
    #7
    you are welcome.. :)
     
    susan8051, Jun 12, 2008 IP