The first thing to say would be, you can’t say you haven’t been warned – see codex page paginate_comments_links(), section »Defaults«:
These arguments are mostly to make the call of
paginate_links()
work, so be careful if you change them.
It’s true, paginate_comments_links() is pretty much just a already customized version for comments of paginate_links(), with those defaults to make this work:
- ‘base’ => add_query_arg( ‘cpage’, ‘%#%’ ),
- ‘format’ => ,
- ‘total’ => $max_page,
- ‘current’ => $page,
- ‘echo’ => true,
- ‘add_fragment’ => ‘#comments’
What you’re doing is overriding the necessary – hence the warning – defaults of paginate_comment_links()
with the defaults of paginate_links()
, which leads to the comment links not working anymore. If I’m seeing it correctly the only parameter you want to change is type
, so this is the only one you have to pass.
Like this:
$args = array(
'type' => 'list'
);
paginate_comments_links( $args );
Or:
paginate_comments_links( array( 'type' => 'list' ) );