I'm stuck on an issue I was hoping someone could help me with. I have a custom search form I've created, but the output of the code isn't correct, making my search results wonky. (As a side note, I'm using the Relevanssi plugin to make the search results more relevant.)
So what I have is a regular search form, but I needed checkboxes (not a dropdown) to search multiple categories. The output - as far as getting the category ID's - is good, but the results are not because it appears that 1) the results are pulling the the name *and* the array brackets, and 2) it's encoding them.
So, instead of
http://localhost:8888/?s=Search&cat=40&cat=12 (or, alternatively,
http://localhost:8888/?s=Search&cat=40,12), it's giving me this string of gunk:
I know the
%5B%5D items are the array brackets, and I can't figure out to how to remove them from the url string. Because when I *do* remove them manually, it works perfectly. So something is encoding those brackets, and I've been pounding my head trying to figure out what.
This is my code. I'd really appreciate it if someone could tell me how to get this stuff *un*encoded, because without that gunk, it really does work wonderfully.