I can’t seem to fix this (what I know is pretty simple) problem.
I’m creating a simple tag search that will search venues on my website.
It’s set up so when multiple tags are selected it will bring back all results that have all the tags assigned to them. So I need some simple code that displays checkboxes on the homepage and alters the URL to
.../placecategory/venue/?place_tags=place+venue
I’ve come up with the following code (with just 2 options, for now) just to get it working
<form
action="<?php bloginfo('home') ?>/placecategory/venue/?place_tags=hall+stage"
method="get" accept-charset="utf-8">
<h2>Search</h2>
<input type="checkbox" value="hall" name="place_tags">
<label for="tag-105">hall</label>
<input type="checkbox" value="stage" name="place_tags">
<label for="tag-104">stage</label>
<input type="submit" value="Search">
</form>
The problem with this is it’s changing the URL to
.../placecategory/venue/?place_tags=hall&place_tags=stage
which isn’t pulling up the results on my site. How can i change this so that it removes the second &place_tags=
(and every one after that)?
I can tell that i’m missing something silly but it’s really frustrating me!!
Thanks in advance 🙂
Is this what you are looking for?
You can parse thru this values with JS and put them into hidden input at once.
Try this:
include jQuery library to the head section:
then in the body section
assign to your inputs class=”get-me” and put your image into img. You have to only test this on other browsers then FF. Good luck.