Add & Search Multiple Categories
Hi All,
Is there a way of implementing an ability to add a single post(advert) to more than one category. Also an ability to search (on the front end) within more than one category.
Ideally im after something like this...
Front End Search:
Set up search on the front end with two multiple select list boxes. One for category and the other location like so ...
Input Field
Code:
<input type="text" name="s" id="s" class="input" />
Category
Code:
<SELECT MULTIPLE NAME="Category">
<OPTION VALUE="c1">Cat 1
<OPTION VALUE="c2">Cat 2
<OPTION VALUE="c3">Cat 3
<OPTION VALUE="c4">Cat 4
<OPTION VALUE="c5">Cat 5
</SELECT>
Location
Code:
<SELECT MULTIPLE NAME="Location">
<OPTION VALUE="l1">Loc 1
<OPTION VALUE="l2">Loc 2
<OPTION VALUE="l3">Loc 3
<OPTION VALUE="l4">Loc 4
<OPTION VALUE="l5">Loc 5
</SELECT>
Submit Button
Code:
<input type="submit" class="go" value="Go!" />
Adding a Post(advert):
When adding a post you are presented with the same two multiple select list boxes. One for category and the other for location like above.
However I don't want duplicate search results on the front end. I understand advert was posted to more than one category I don't want the post be displayed more than once/repeated within the search result list. Each post form the search result (each record) will display the categories it belongs to.
Like so
Post Name/Title
category 5, category 6, category 7
Post Name/Title
category 9, category 6
I know this is a lot to ask but would appreciate any advice?