I have a list checkbox categories, which when checked, use WordPress's admin-ajax.php to filter posts to the selected category.
All is working great, however, I am struggling to get the updated pagination. I'm using query_posts as follows:
$paged = (get_query_var('paged')) ? get_query_var('paged') : 1; $args= array ( 'post_type'=>'course', 'paged'=>$paged, 'posts_per_page'=>3, 'tax_query' => array( array( 'taxonomy' => 'subject', 'field' => 'slug', 'terms' => $tags_from_group ) ) ); $posts=query_posts( $args);
I then pass the $posts back as data, but I don't know how to access the updated pagination..
I was thinking something along these lines:
$pagedposts=array(); $pagedposts['posts']=$posts; $pagedposts['pagination']=???
So $pagedposts['pagination'] would be the data needed to update the old pagi after the ajax call is successful..
I found someone else had this problem here, but there is no solution there...