These hooks fire around the comments area and each individual comment.
Hooks in firing order
generate_before_comments_containergenerate_before_commentsgenerate_inside_commentsgenerate_after_comment_text
Comments area
generate_before_comments_container
GP Free
The generate_before_comments_container hook appears before the .comments-area element.
Parameters: none. Default: —.
add_action( 'generate_before_comments_container', function() {
?>
<div class="my-notice">Insert your content here.</div>
<?php
} );
Guide: Blog
generate_before_comments
GP Free
The generate_before_comments hook appears inside the .comments-area element.
Parameters: none. Default: —.
add_action( 'generate_before_comments', function() {
?>
<div class="my-notice">Insert your content here.</div>
<?php
} );
Guide: Blog
generate_inside_comments
GP Free
The generate_inside_comments hook appears inside the #comments element.
Parameters: none. Default: —.
add_action( 'generate_inside_comments', function() {
?>
<div class="my-notice">Insert your content here.</div>
<?php
} );
Guide: Blog
Single comment
generate_after_comment_text
GP Free
The generate_after_comment_text hook appears just after the .comment-content element.
Parameters: $comment, $args, $depth. Default: —.
add_action( 'generate_after_comment_text', function( $comment, $args, $depth ) {
?>
<div class="my-notice">Insert your content here.</div>
<?php
} );
Guide: Blog