Take the 2-minute tour ×
WordPress Development Stack Exchange is a question and answer site for WordPress developers and administrators. It's 100% free, no registration required.

I have a page template like having code, (on the link below)

http://pastebin.com/mZaRLKp2

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.

share|improve this question
    
Please clean this up-- make proper sentences and paragraphs breaks, and use the code formatting functions in the editor. It looks like you've pasted the information from some other document and the formatting got scrambled. –  s_ha_dum Aug 13 '13 at 21:57
    
I am facing low net speed. So please consider my question anyhow. I will try to post using the editor, it take some time to accustom with it. –  passion.arya Aug 14 '13 at 21:17

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Browse other questions tagged or ask your own question.