I am having troubles with pagination. It's widget. Every widget does have unique id . Say i have two widgets with pagination. If I cick page 2 of widget 2 then it will work but it will change the pagination of first one too.
$paged_id = $this->get_id();
$paged_query_var = 'paged'.$paged_id;
//var_dump($paged_id);
$paged_bottom = (get_query_var($paged_query_var)) ? absint(get_query_var($paged_query_var)) : 1;
$paged_bottom_args = array(
'format' => '?paged'.$paged_id.'=%#%',
'current' => intval($paged_bottom),
'total' => intval($query->max_num_pages),
'mid_size' => $pagination_midsize,
'prev_text' => '<i class="fa fa-arrow-left"></i>',
'next_text' => '<i class="fa fa-arrow-right"></i>',
);
echo paginate_links($paged_bottom_args);
this is what i tried but it does not work as get_query_var will not have variable in it. This is some thing dynamic so i am not able to set the variable for get_query_var using the filter.
Is there any way?
发布者:admin,转转请注明出处:http://www.yc00.com/questions/1744794534a4594126.html
评论列表(0条)