It depends on your theme. For the site I have open now, it is comments.php.
Thread Starter
Gustav
(@4ever16)
My theme just have this part “allmost” in comments.php
So i think comments section my be in some other file in wordpress but where?
<?php the_comments_navigation(); ?>
<ol class="comment-list">
<?php
wp_list_comments( array(
'style' => 'ol',
'short_ping' => true,
'avatar_size' => 56,
) );
?>
</ol><!-- .comment-list -->
To get data for a specific comment, use get_comment()
. You do need the WP_Comment object’s ID to get data this way.
To alter how wp_list_comments()
behaves, you can pass various arguments to it from your template file. For all possible args, see
https://developer.wordpress.org/reference/functions/wp_list_comments/#parameters
Most of the output is managed by a Walker_Comment object. If you want to change this behavior, you can browse the source code for possible filters, but you will likely need to extend the class to create your own version.
https://developer.wordpress.org/reference/classes/walker_comment/