Help Nested Comments in my Free Theme
-
?Hi! I try, lot of times, but don’t understand php and the tutorials in spanish are very difficult to me.
?Could someone help me to have nested comments in my theme? Here i have the code, please, tell me where i must do changes -i have nested comments in general options active yet- to make it possible. Thanks for your patience and for help me.
<?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. Enter the password to view comments.</p> <?php return; } } /* This variable is for alternating comment background */ $oddcomment = 'class="alt" '; ?> <!-- You can start editing here. --> <div id="comments"></div> <?php if ($comments) : ?> <div class="comments-title"><?php comments_number('Sin comentarios', '1 comentario', '% comentarios' );?> para “<?php the_title(); ?>”<a href="<?php comments_popup_link();?>#respond"> <span class="small">Deja una respuesta</span></a></div> <ol class="commentlist"> <?php foreach ($comments as $comment) : ?> <li <?php echo $oddcomment; ?>id="comment-<?php comment_ID() ?>"> <?php echo get_avatar( $comment, 32 ); ?> <cite><?php comment_author_link() ?></cite> dijo: <?php if ($comment->comment_approved == '0') : ?> <em>//Tu comentario está pendiente de aprobación.//</em> <?php endif; ?> <br /> <small class="commentmetadata"><a href="#comment-<?php comment_ID() ?>" title=""><?php comment_date('l, j \\d\e F \\d\e Y') ?> a las <?php comment_time() ?></a> <?php edit_comment_link('editar',' ',''); ?></small> <?php comment_text() ?> </li> <?php /* Changes every other comment to a different class */ $oddcomment = ( empty( $oddcomment ) ) ? 'class="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.</p> <?php endif; ?> <?php endif; ?> <?php if ('open' == $post->comment_status) : ?> <div class="respond-title"><h3 id="respond">Deja un Fantabuloso Comentario</h3></div> <div id="comment-box"> <?php if ( get_option('comment_registration') && !$user_ID ) : ?>
- The topic ‘Help Nested Comments in my Free Theme’ is closed to new replies.