Forums

Styling Threaded Comments Problem (2 posts)

  1. DavidTurnbull
    Member
    Posted 2 years ago #

    Hi guys,

    I've been trying to change the layout and style of the comments section of my blog but have been running into a bit of a problem.

    People leave comments on my posts and I reply to them from the admin area. The problem is, the comments don't appear below the readers comments, but at the bottom of the list, as you can see at the bottom of this post:

    http://www.davidturnbull.com/interview-location-independent-lea-woodward/#comments

    This is the code in comments.php I use to display the comments:

    <?php if($comments) : ?>
    	     <ol class="commentlist">
    	     <?php foreach($comments as $comment) : ?>
    	         <li class="<?php
    			if( $comment->user_id == $post->post_author)
    			{
    			echo "authcomment";
    			}
    			else
    			{
    			//default style
    			}
    					?>">
    	             <?php if ($comment->comment_approved == '0') : ?>
    	                 <p>Your comment is awaiting approval</p>
    	             <?php endif; ?>  
    
    		<div class="comment-author">
    		<strong><?php comment_author_link(); ?></strong><br />
    		<span class="date"><?php comment_date(); ?></span><br />
    		<!-- <span class="time"><?php comment_time(); ?></span> -->
    		<?php
    		   echo get_avatar( $comment, $size = '80' );
    		   ?>
    		</div>
    
    		<div class="comment-text">
    			<?php comment_text(); ?>
    		</div>
    
    	         </li>
    	     <?php endforeach; ?>
    	     </ol>
    	 <?php else : ?>
    	     <p>No comments yet</p>
    	 <?php endif; ?>

    ...I didn't write that code (just added the styles) because honestly this stuff confuses the hell out of me.

    If someone could help me make it so my replies are shown below the comment I'm replying to, whilst maintaining the layout and look my the comments I would be HUGELY grateful.

    Thanks :D

  2. esmi
    Theme Diva & Forum Moderator
    Posted 2 years ago #

Topic Closed

This topic has been closed to new replies.

About this Topic