GO BACK

Contact Us

5-E / 22 BP , 2nd Floor
Near BK Chowk
121001
Faridabad (Haryana), INDIA

Home Forums WordPress How to enable pagenation in Genesis Framework? Reply To: How to enable pagenation in Genesis Framework?

#1978 Reply

admin
Keymaster

Hello,

To add pagination to comments, you can use the following example:

You will need to set up the options in SETTINGS > DISCUSSION for paging to work.

The easiest way to do so is with the following function, which prints out a link to the next and previous comment pages, as well as a numbered list of all the comment pages.

$args = array(
	'base' => str_replace( $big, '%#%', esc_url( get_pagenum_link( $big ) ) ),
	'format' => '?paged=%#%',
	'current' => max( 1, get_query_var('paged') ),
	'total' => $wp_query->max_num_pages,
        'before_page_number' => '<span class="screen-reader-text">'.$translated.' </span>'
) ;
paginate_comments_links($args);

This will give you the numbered pagination.

Hope this will help you.

Thanks

img