Created
December 17, 2017 16:09
-
-
Save version-control/3f7fab5279ff5caf43b3c56c3606048d to your computer and use it in GitHub Desktop.
WP Index Include Comments in Loop
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
echo '<h6><p>'; | |
//Gather comments for a specific page/post | |
$comments = get_comments(array( | |
'post_id' => $post->ID, | |
'status' => 'approve' | |
)); | |
wp_list_comments(array( | |
'callback' => bbird_under_comments, | |
'per_page' => 10, // Allow comment pagination | |
'reverse_top_level' => false //Show the latest comments at the top of the list | |
), $comments); | |
echo '</p></h6>'; | |
?> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
10 Comments with pagination for incorporation into WP loop on index file.