I was able to reproduce the issue. It’s being caused by the loop in your code:
<?php if (have_posts()): ?> <?php while (have_posts()): ?>
Replace that standard loop with if ( have_comments() ) {...
, like this:
<?php if ( have_comments() ) { ?>
// The title, content and some other html here
wp_list_comments(array( 'callback' => 'comments_callback'), get_comments());
<?php endif; ?>
Related Posts:
- Nested comments ignored for max per page in wordpress
- Custom Comments – Parent / Nested Reply
- Why is styling comments so complex?
- Comment form not display properly?
- How to Auto Approve Comments on a Specific Page?
- comment_form() generates the wrong action url
- Customize comment list markup
- how to pull wordpress post comments to a external page
- Separated Comment from Post
- Remove “a href” from wp_list_comments()
- How to call wp_list_comments() with callback outside the loop
- How to get comment meta values by post ID
- Compact pingback list with favicons
- How to change i18n/l10n of #reply-title? (Old title: Comment reply link not working)
- How to remove comment link title attribute?
- Comment entry screen shows even though “Allow Comments” is unchecked
- Jetpack Comments with fall-back
- WP_Comment_Query – Get comments and answers separately
- Trackbacks not displaying
- Nested comments in WordPress theme
- Comment status shows ‘closed’ in db, but it shows ‘open’ when i echo it
- Difference between “comment_form_default_fields” AND “comment_form_fields”
- How to enable Disqus comments in a WordPress theme I’m creating from scratch? [closed]
- How to add custom class to get_avatar()
- WordPress Comment spam issue
- WordPress comments title
- Ajax Comment Upvotes – Votes don’t always register
- Modify comments_popup_link output
- Woocommerce Theme Reviews / Comments
- child comments not displaying as nested
- How can I fix the even/odd child classes comments so that the comments are unaffected by the top-level even/odd?
- wp_update_comment not working
- Recent posts with comment count in “Sidebar” template [closed]
- Is there a Function so that the author of the comment can delete his own comment?
- Making update notification functionality for my themes
- Should `get_template_directory_uri()` be escaped?
- Best practice for including plugins as part of a theme?
- How to disable 3.1 “Admin Bar” via script for the admin user?
- Where do I find the functions triggered within a hook?
- Is it possible to display the admin bar while in the Theme Customizer?
- How to Change CSS Variable value in Theme Customizer Live Preview
- Pagination & get_pages?
- Easy WordPress theme creation tutorial? [closed]
- How do I add a post to a menu
- Where is definied the theme location for the main menu in a WordPress template?
- How to get the URI to a theme without the domain. Example: /wp-content/themes/my-theme
- Check if user has enrolled in Sensei LMS Course on Lesson Page
- How to handle custom form submission?
- menu behavior is not as expected
- My custom theme does not load the translations
- Disable front-page.php template
- Gutenberg – editor-font-sizes in functions not working
- Same ACF on two different pages
- Custom Field returning Numerical Value for Image rather than URL
- which is the best way to customize nav-menu-template.php?
- Default string not appearing want to translate
- How to make a local cache of mshots images
- Using a page as home, how do I prevent nav from setting both home and page links active?
- 2 localizations inside a WordPress theme
- Child Theme’s style.css not loading in mobile browser
- My jQuery is enqueued properly. So why isn’t it working?
- 3 Level Deep Navigation Menu Not Showing All Levels
- Broken theme, template is missing
- WordPress page/blog incorporated into static website
- wp_enqueue_script not working?
- Theme Development -> Specific Homepage
- Premium theme licensing of php called through AJAX
- is_single() works in plugin, not in theme?
- Do I need to create a child theme for JointsWP
- Issue on Accessing To Ajax Enqeued File to Pass to URL for Ajax Call
- pass wordpress template directory into ajax url call
- Custom jquery not code not working in wordpress
- New to WordPress – Read the Codex, Other Docs; Still Confused
- Style first 3 posts differently with WP_Query [duplicate]
- is_front_page use in sidebar.php
- matisse theme show excerpts not whole content
- My custom taxonomies are not showing up in the admin menus
- Let user to upload multiple time
- get main URL from subdirectory with php
- How to add custom theme in hosting server?
- Infinite loop when nesting have_posts()
- WordPress Custom Theme : Theme Builder vs ACF vs Gutenberg
- Is_single not working properly in genesis
- Debugging slow WordPress Theme Customizer (Any option similar to Query Monitor)?
- After WP 4.6.1 Update , Blog page started giving 500 error
- How to show children pages as array
- How do I keep images in posts below a certain size without editing the post?
- Theme options not displaying correctly after theme update
- Multiple Content Shortcodes
- Is it possible to customize the layout of Gallery Shortcode?
- How can i use archive.php for indexing wordpress default posts?
- How to use esc_attr__() function properly to translate a variable that contains string?
- What to do when child theme is out of date with parent theme
- Query for tag given slug
- Image Size wrong during upload
- How can I add a single image from a gallery into the page header?
- Bootstrap 4 mobile menu not working for WordPress Development
- How do I send out an update for my custom wordpress theme?
- custom wordpress theme blog page always not showing the last two pages of the articles
- Cart button not working on mobile version [closed]