I have to add pagination on list of post based on tags and two categories

I have to create a list of post for a random tags. 5 of them which should comes under X category and 15 of them should not come under X category. I have summarized my query here and its fine.

array(
'tag_id' => $tag->term_id,
'category__not_in' => array($X_category),
'type' => 'post'
);

array(
'tag_id' => $tag->term_id,
'category__in' => array($X_category),
'type' => 'post'
);

The issue here is I don’t understand how to add pagination through wordpress default function for this scenario. (I could add pagination manually, but it seems to be painful.)

Read more here: I have to add pagination on list of post based on tags and two categories

Leave a Reply

Your email address will not be published. Required fields are marked *