paginate_comments_links [ WordPress Function ]
paginate_comments_links ( $args = array() )
| Parameters: |
|
| See: | |
| Returns: |
|
| Defined at: |
|
Benzer Fonksiyonlar: get_comments_link, next_comments_link, get_comment_link, paginate_links, comments_link
Create pagination links for the comments on the current post.
Source
<?php
function paginate_comments_links($args = array()) {
global $wp_rewrite;
if ( !is_singular() || !get_option('page_comments') )
return;
$page = get_query_var('cpage');
if ( !$page )
$page = 1;
$max_page = get_comment_pages_count();
$defaults = array(
'base' => add_query_arg( 'cpage', '%#%' ),
'format' => '',
'total' => $max_page,
'current' => $page,
'echo' => true,
'add_fragment' => '#comments'
);
if ( $wp_rewrite->using_permalinks() )
$defaults['base'] = user_trailingslashit(trailingslashit(get_permalink()) . 'comment-page-%#%', 'commentpaged');
$args = wp_parse_args( $args, $defaults );
$page_links = paginate_links( $args );
if ( $args['echo'] )
echo $page_links;
else
return $page_links;
}
?>
Examples [ wp-snippets.com ]
Google Arama Sonuçlarý
- Template Tags/paginate comments links « WordPress Codex
Description. Generate a new way to list the paged comments in the comment template. Instead of using Previous or Next Comments links, it displays a full list of ...
codex.wordpress.org - paginate_comments_links() error on taxonomies - WordPress
paginate_comments_links() error on taxonomies (1 post). retroriff. Member Posted 1 year ago #. Hello, I'm using comments pagination in order to display 100 ...
wordpress.org - How to Add WordPress Paged Comments without a Plugin (plus ...
<div class="pagination"> <?php paginate_comments_links(); ?> ... <?php paginate_comments_links( array('prev_text' => '‹ Previous', 'next_text' => ' Next ...
design.sparklette.net - comments - customizing the permalink for paginate_comments_links ...
May 17, 2012 ... By default, paginate_comments_links() outputs the comments page links as .../ comment-page-1/#comments . Is it possible to customize the link ...
wordpress.stackexchange.com