I want to be able to style the comments section to work with the theme I am building. I do not have a comments.php file in the website however when I include:
<?php if ( comments_open() || get_comments_number() ) :
comments_template();
endif;
?>
I get a full comments section under my post, being able to add and view comments and commenters info. I thought that when I include the above if statement it was supposed to pull the info from the comments.php file that included all of my html with it.
I now don't know where to view the CSS that is attached to the comment form, except in the Google 'Inspect' section for developers, so that I can alter it.
I looked in the twentynineteen theme and it has my code as well as a very complicated comments.php file. I can't claim to fully understand the comments.php file but I'm confused about how I am getting an output of a comment form and its replies without having to have a comments.php file.
What am I missing? Can someone help clear this up for me?
I want to be able to style the comments section to work with the theme I am building. I do not have a comments.php file in the website however when I include:
<?php if ( comments_open() || get_comments_number() ) :
comments_template();
endif;
?>
I get a full comments section under my post, being able to add and view comments and commenters info. I thought that when I include the above if statement it was supposed to pull the info from the comments.php file that included all of my html with it.
I now don't know where to view the CSS that is attached to the comment form, except in the Google 'Inspect' section for developers, so that I can alter it.
I looked in the twentynineteen theme and it has my code as well as a very complicated comments.php file. I can't claim to fully understand the comments.php file but I'm confused about how I am getting an output of a comment form and its replies without having to have a comments.php file.
What am I missing? Can someone help clear this up for me?
Share Improve this question edited Jun 28, 2019 at 18:23 Niall asked Jun 28, 2019 at 18:01 NiallNiall 271 silver badge5 bronze badges1 Answer
Reset to default 4If in the root of the folder of your theme there is no file "comments.php". Than comments_template ()
include the file from the path "/wp-includes/theme-compat/comments.php".
To make changes in that file you can copy "comments.php" from this folder to the root of your theme. And then change as you like.