Add comment’s author email
1 2 3 4 5 6 7 8 |
//In a php file created in your WP-AppKit theme's "php" folder: function add_comment_author_email( $comment_data, $comment_data_raw, $post_id ) { $comment_data['author_email'] = $comment_data_raw['comment_author_email']; return $comment_data; } add_filter( 'wpak_comments_data', 'add_comment_author_email', 10, 3 ); |
Then in your comments.html template:
1 2 3 |
<p> My author email: <%= comment.author_email %> </p> |
Add comment’s parent ID
1 2 3 4 5 6 7 8 |
//In a php file created in your WP-AppKit theme's "php" folder: function add_comment_parent_id( $comment_data, $comment_data_raw, $post_id ) { $comment_data['parent_id'] = $comment_data_raw['comment_parent']; return $comment_data; } add_filter( 'wpak_comments_data', 'add_comment_parent_id', 10, 3 ); |
To Know More
Here is the section of the doc concerning the comments.html template