I set up a site specific plugin where I have the code to do an AJAX query. My problem is that when I try to add pagination to it the resulting pagination links look this:
that fails of course, normally pagination links look like this
Here is the code I use to get the pagination:
$big = 999999999; $paginator = paginate_links( array( 'base' => str_replace( $big, '%#%', get_pagenum_link( $big ) ), 'format' => '?paged=%#%', 'current' => max( 1, get_query_var('paged') ), 'total' => $search_query->max_num_pages, 'prev_text' => '«', 'next_text' => '»' ) ); $result["pagination"] = $paginator;
- The topic ‘Pagination when doing an AJAX query’ is closed to new replies.