[wp-hackers] paginate,
previous and next comment links in Wordpress 2.7
Mark Cunningham
mark.cunningham at gmail.com
Fri Dec 5 16:55:50 GMT 2008
Am I right in saying that paginate_comments_links,
previous_comments_link and next_comments_link cannot be used before
wp_list_comments, they must only be used after?
It's been driving me bonkers because I wanted to put page links at the
top of the comments (mirroring the setup I had with the paged-comments
plugin). But when I dig into the code I see that
"$wp_query->max_num_comment_pages", which is used by
paginate_comments_links, previous_comments_link and next_comments_link
to calculate the max number of comment pages, is only set *after* the
walker has been executed in wp_list_comments. Before that, it seems to
be set to 0.
Which means you can only have page, prev and next links after the
comments, which seems a bit limited. Should this be a bug?
Mark
More information about the wp-hackers
mailing list