For some background, I added a nav-item to the buddypress menu that shows that person's most recent comments, but I can't get pagination links to show up. I've gotten the comments to show and can even limit how many are on a page. My code:
global $bp; $author_id = $bp->displayed_user->id; $args = array( 'user_id' => $author_id, 'orderby' => $order_by, 'order' => $order_dir,); ?> <div id="CommentListWrapper"> <ol class="comment-list"> <?php // show individual comments wp_list_comments('callback=mytheme_comment&type=comment', get_comments($args)); ?> </ol> <div class="comms-navigation"> <div style="float:left"><?php previous_comments_link(); ?></div> <div style="float:right"><?php next_comments_link(); ?></div> </div> </div><!-- #COMMENT LIST WRAPPER -->
with mytheme_comment function:
Things I've tried:
- enabled comment pagination in the Discussion admin options
- setting the per_page for wp_list_comments
- using paginate_comments_links( ) instead of using the individual next and previous functions
No matter what I do the pagination links will not appear. I can see different pages of comments by setting the "page" option in wp_list_comments, so I know they exist. The links for pagination just won't show. Any help would be greatly appreciated.