I am at a loss, and I’d really appreciate a pointer.
I am trying to filter my posts using query_posts. The posts should be filtered by category. I am using an array to only return posts that belong to all the categories at once. I got this part working.
The problem arises when I implement a form with 4 checkboxes, one per each category, which the user should select, then submit and see a list of posts that only belong to the selected categories.
So this is my not working code so far:
The problem is that nothing is returned. The URL of the page does change including the selected checkbox value, but I dunno if that is worthless. When I try to echo $cats, I only get three commas, no category names, or values of sort.
Do you have an idea if I am passing the variables the wrong way or anything else? Thanks in advance.
- The topic ‘Pass form values to query_posts’ is closed to new replies.