Custom WordPress Theme Development (2022) #19 - Comments page, comment.php

Опубликовано: 23 Апрель 2026
на канале: AGWS | And Go Web Solutions
583
3

19th video in the series where i show you guys how to make a simple comment.php and how to display all the comments for the post .

Challenge for today is getting the comment for each post .
-------------------------------------------------------------------
Steps:
1. Create a comment .php in your root folder

2. add
Template Header
Comments Title
Comment Listing
Comment Pagination
Comments are closed message.


3. while loop over the comments and add pagination in case comments exceed the page limit.

-------------------------------------------------------------------
Git commit :
🔗LINK : https://github.com/andgo-edu/bootstra...
-------------------------------------------------------------------

Useful links :
-------------------------------------------------------------------

1.Comment Template
🔗LINK: https://developer.wordpress.org/theme...


2. wp_list_comments() : Displays all comments for a post or Page based on a variety of parameters including ones set in the administration area.
🔗LINK: https://developer.wordpress.org/refer...

3. comment_form() : This tag outputs a complete commenting form for use within a template.
🔗LINK: https://developer.wordpress.org/refer...

4. comments_template() : Load the comment template specified in first argument
🔗LINK: https://developer.wordpress.org/refer...

5. paginate_comments_links() : Create pagination links for the comments on the current post.
🔗LINK: https://developer.wordpress.org/refer...

6. get_comments() : Retrieve the comments with possible use of arguments
🔗LINK: https://developer.wordpress.org/refer...

7. get_approved_comments() : Retrieve the approved comments for post id provided.
🔗LINK: https://developer.wordpress.org/refer...


Comment , Like and subscribe and watch the next video in the series 😁