I have a page template like having code, (on the link below)
Actually it's the problem of getting custom post list having all the multiple custom
taxonomy terms with pagination. This type of problem have been discussed on internet many places but I am yet to get a clear
understanding of how to solve. The loop gives me list successfully on page 1 but when I go for next pages my custom query
doesn't work instead default query works. I have a custom post 'volunteers'. It has custom taxonomy of 'lgroup' and there are some
types of 'lgroup' like 'location', 'group_type', 'meeting_day' etc. I want to filter the
list of post only having combination of particular 'location' and 'meeting_day'. I create a form choosing them and 'POST' request for the form to submit. Because when I make
this 'GET' request my custom taxonomy didn't appear to work in url and redirect to home
page. When I use 'POST' request to get custom terms it works for first page but lost on next page
and default list of 'volunteers' type post appears.
Could anyone tell how to cary forward or maintain the custom query on all pages in
pagination. I am really tired to search the solution for this. It would be nice if somebody
explain the solution. I desperately want to know how to maintain the custom query with
pagination. One more question ? I wanted to list posts only having both terms but IN operator in
'tax_query' work like 'OR' operator it lists post belongs to any terms belongs to but I want
post only when it associates to both the terms. Currently I am collecting the terms and
excluding them with all the terms and used rest array for with NOT IN operator in
'tax_query'. Is there any way to list post having both the terms 'group_type' and 'location'
in my code.
So there is two questions?
01 >> Custom query with pagination, Pagination really sucks me yet. Please help me somebody.
02 >> having multiple custom taxonomies only and only if custom post belongs to both terms
not one of them.