[wp-hackers] did I stumble across a bug?

Jonathon Byrd jon at 5twentystudios.com
Tue Apr 26 18:50:33 UTC 2011


I see right off the bat that you have a period instead of commas in your
hidden input. If that doesn't fix it, then you could always try sending
category__in or category__and instead of cat

 Sincerely,

Jonathon Byrd | Partner | Senior Software Engineer
5 Twenty Studios, LLC

C: (360) 747-7401 | O: (503) 268-1177 | F: (954) 867-1177
jon at 5twentystudios.com | www.5TwentyStudios.com<http://www.5twentystudios.com/>



On Tue, Apr 26, 2011 at 11:48 AM, Foolish Visions <shelly at foolishvisions.com
> wrote:

> I'm just curious if this is a bug, or something else.
>
> I'm creating a custom search form, and it passes variables into a hidden
> input filed that contains a comma-separated list of category IDs. it seemed
> to be working just fine (searching in the categories I've designated) until
> I came to a search where I *knew* that certain posts should show up from
> between two categories. I then realized that even though my hidden input
> field contained the proper format (and the category ID's were being passed
> as they should to the query), the query was only looking in the first
> category ID instead of all of them.
>
> So, for instance, if I have 'input type="hidden" name="cat" value="1.3.5" '
>
> the values of 1, 3, and 5 are being passed (as evidenced by the URL string
> - it contains "cat=1,3,5") - but it's only searching category 1 and ignoring
> 3 and 5.
>
> Is this normal behavior? or a bug? or what? Everything I can find says that
> the input field (as I have it) should make the query use all three category
> IDs, but it's not. It's passing (even when I print_r the query vars, they
> show up as expected), but not using.
>
> Anyone know?
>
> ~Shelly
> _______________________________________________
> wp-hackers mailing list
> wp-hackers at lists.automattic.com
> http://lists.automattic.com/mailman/listinfo/wp-hackers
>


More information about the wp-hackers mailing list