wrong Pagination link
-
Hi,
I’m doing a template page to display custom post type content.
I have well display one and 5 post on thearchive page.I’m looking to add paginaton system.
I have that:
$total = $the_query->max_num_pages; if ( $total > 1 ) { if ( !$current_page = get_query_var('page') ) $current_page = 1; // structure of "format" depends on whether we're using pretty permalinks $format = '%#%'; echo paginate_links(array( 'base' => get_pagenum_link(0) . '%#%', 'format' => $format, 'current' => $current_page, 'total' => $total, 'mid_size' => 5, 'add_args' => true ));
For first page it is fine I got URL https://mysite.com/mypagetitle/
For the second page also https://mysite.com/mypagetitle/2/
Since I’m on second or other not https://mysite.com/mypagetitle/2/3 or https://mysite.com/mypagetitle/20/5How can I correct url on pagination link ?
Viewing 5 replies - 1 through 5 (of 5 total)
Viewing 5 replies - 1 through 5 (of 5 total)
- The topic ‘wrong Pagination link’ is closed to new replies.