Glossary Term
wp_list_comments()
wp_list_comments() — Displays a list of comments. Used in the comments.php template to list comments for a particular post.
Inputs: $args (string|array): Optional. Formatting options. Field $walker (object): Instance of a Walker class to list comments. Default null. Field $max_depth (int): The maximum comments depth. Default empty. Field $style (string): The style of list ordering. Accepts ‘ul’, ‘ol’, or ‘div’. ‘div’ will result in no additional list markup. Default ‘ul’. Field $callback (callable): Callback function to use. Default null. Field $end-callback (callable): Callback function to use at the end. Default null. Field $type (string): Type of comments to list. Accepts ‘all’, ‘comment’, ‘pingback’, ‘trackback’, ‘pings’. Default ‘all’. Field $page (int): Page ID to list comments for. Default empty. Field $per_page (int): Number of comments to list per page. Default empty. $comments (WP_Comment[]): Optional. Array of WP_Comment objects. Default null.
Returns string|null|void: HTML list of comments when ‘echo’ is false, null when there are no comments to list. Nothing otherwise.
Term Connections
Explore related terms connected by shared tags, shared categories, and relationship phrases. This map loads only when it comes into view.
Loading term connections…
