You can check if the comment has a parent and only count if not:
global $counter;
if ($comment->parent == 0){
$counter++;
}
Related Posts:
- R: Comment out block of code
- How to rearrange fields in comment_form()
- Commenting in user profile page?
- How do I delete all comments from a specific old blog post?
- Removing the “Website” Field from Comments and Replies?
- How to load and show comments with AJAX instead of pagination?
- Comments not appearing at all
- A plugin where users can comment with Facebook or Twitter or OpenID [closed]
- Comment Count for each Comment Author
- Hook/Filter before and after comments
- Comment form validation
- Sticky Comments
- Comments number message in password protected post
- Disable Comments Feed
- Use rich text editor in comments?
- I have tried using Plugins to remove 72K comments with no success
- Display commenter’s registration date on comments?
- show un-approved comments at wordpress front end
- How to add consent checkbox in comment section
- How to add pagination to comments?
- WP 4.4.1 allow empty comments via add_action ‘pre_comment_on_post’
- How to get replies of a comment?
- Report spam button
- Recent comments from my blogs only
- Share comment to twitter after publishing [closed]
- changing comment-page-# to something like review-page-#
- show if comment is in moderation
- Disable or Enable Comments on Front end [closed]
- Deleting the attached “comment replies” when trashing a comment
- How can I get a list of comments by target
- Load comments.php template outside the post loop
- Auto-fill Custom comment fields
- Highlighting the current users comment
- How to make all the posts commentable by default? Imputs in Settings/Discussions are not saved
- How to auto empty comment trash after X days
- comments.php keep comment date/time but remove date/time’s #hyperlink
- how to change comment author’s link from user’s website to author’s page(author.php)?
- Disabling archives, search results, comments, etc?
- Control panel loads slowly due to 2 slow queries on comment table
- Display complete comment section via post ID
- Comment Pagination Behavior wp_list_comments() – comment ordering and pagination
- Check if comment was successfully submited
- After Submitting Comment Form Shows an Empy Page in WordPress
- Unique User for all visitor, but possibility to comment with unique name
- comments_array filter doesn’t work in some themes
- Redirect when click on “response” in comment section
- Troubleshooting Emoji in Comments
- Link to a User’s Forum Profile From Their Comment
- if user role is then echo text
- strange behavior with comment position
- Safely editing core files
- Way to count the number of people who have commented on a post?
- Batch approve comments
- Disable comments and pingbacks on old custom post types
- Can I turn off further comments on a single page?
- Add paragraph tags to comments
- How to tweak comment fields properly from functions.php
- How to allow duplicate comments?
- Are there some caveats for using guids for FB comments
- Two textareas showing up in comments.php
- WordPress comments – delimiter “/” not found
- Make email not required comments.php
- Give subscribers the option to post anonymously
- Thesis Theme Custom Loop
- Sync comments between two WP installs
- Styling Admin comments in WP 3.1.3
- Displaying comment counts in WP Gallery thumbnail view
- Removing comment option
- pre_comment_content filter not working using IntenseDebate Enhanced moderation
- How t Remove Labels from comment Box
- How to remove a span class?
- Edit Comments Fields
- Random output of comments using a shortcode
- Allow comments only for custom post type
- Comment author profile image
- Comment Form Fields when user logged in
- wp_mail doesnt work inside transition_comment_status
- How add custom text under comment form
- Can’t hover on Submenu
- Can I allow registered users to comment without being logged in or having to be approved?
- Showing different images depending on user role
- Why the capability ‘activate_plugins’ is needed to allow a role to see all posts/pages/comments?
- How to require users not to be logged in for comments on single page only?
- How can I eliminate all comments going into moderation?
- WordPress shows admin’s avatar after editing a comment
- How to change comment-page-1#comment-25 to any string?
- Current user comments + post title
- change text written in english into hindi
- comment-reply.js always focuses on comment textarea
- I need to delete all posts from my homepage & create a static front page [closed]
- Is there a better way to check for a new comment?
- Add comment meta
- Comments from mobile apps & Disqus
- Commentform – Hightlight invalid fields instead of prompting towards error page
- In list with recent coments – only show one comment per page/post (latest comment)
- Why might a comment turn red on approval?
- WordPress comment pagination : newest comments on first page
- member login using photo
- check if a comment was made by a registered user
- WordPress Editor widgets “comments” and “post comments form” getting disappeared with elementor [closed]