Title: [Plugin: reply] Identifying the Reply Loop
Last modified: August 19, 2016

---

# [Plugin: reply] Identifying the Reply Loop

 *  [roadies](https://wordpress.org/support/users/roadies/)
 * (@roadies)
 * [15 years, 6 months ago](https://wordpress.org/support/topic/plugin-reply-identifying-the-reply-loop/)
 * I’m attempting to display a plugin on original comments, but not display it on
   any replies.
 * Here’s my callback function:
 *     ```
       function jason_template($comment, $args, $depth) {
          $GLOBALS['comment'] = $comment; ?>
          <li <?php comment_class(); ?> id="li-comment-<?php comment_ID() ?>">
            <div id="comment-<?php comment_ID(); ?>">
             <div class="comment-author vcard">
                <?php echo get_avatar($comment,$size='48',$default='<path_to_url>' ); ?>
   
                <?php printf(__('<cite class="fn">%s</cite> '), get_comment_author_link()) ?>
             </div>
             <?php if ($comment->comment_approved == '0') : ?>
                <em><?php _e('Your comment is awaiting moderation.') ?></em>
                <br />
             <?php endif; ?>
   
             <div class="comment-meta commentmetadata"><a href="<?php echo htmlspecialchars( get_comment_link( $comment->comment_ID ) ) ?>"><?php printf(__('%1$s at %2$s'), get_comment_date(),  get_comment_time()) ?></a><?php edit_comment_link(__('(Edit)'),'  ','') ?> <?php if(function_exists(ckrating_display_karma)) { ckrating_display_karma(); } ?></div>
   
             <?php comment_text() ?>
   
             <div class="reply">
                <?php comment_reply_link(array_merge( $args, array('depth' => $depth, 'max_depth' => $args['max_depth']))) ?>
             </div>
            </div>
       <?php
               }
   
       ?>
       ```
   
 * This is what I want displayed on 1st level comments and disabled for 2+ deep:
   `
   <?php if(function_exists(ckrating_display_karma)) { ckrating_display_karma();}?
   >`
 * Any idea how to approach this?

The topic ‘[Plugin: reply] Identifying the Reply Loop’ is closed to new replies.

 * ![](https://s.w.org/plugins/geopattern-icon/reply.svg)
 * [reply](https://wordpress.org/plugins/reply/)
 * [Support Threads](https://wordpress.org/support/plugin/reply/)
 * [Active Topics](https://wordpress.org/support/plugin/reply/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/reply/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/reply/reviews/)

## Tags

 * [comment loop](https://wordpress.org/support/topic-tag/comment-loop/)

 * 0 replies
 * 1 participant
 * Last reply from: [roadies](https://wordpress.org/support/users/roadies/)
 * Last activity: [15 years, 6 months ago](https://wordpress.org/support/topic/plugin-reply-identifying-the-reply-loop/)
 * Status: not resolved