cyberhobo / wp-geo-mashup-search

DEPRECATED This functionality is included in Geo Mashup 1.5! No need for a separate plugin any more, you'll get an error if you try to install both.
5 stars 1 forks source link

Different search for categories #3

Closed trewknowledge closed 12 years ago

trewknowledge commented 12 years ago

Hello,

I created a custom post type which has three different categories.

So I have essentially 4 template pages:

Is it possible to add the search form in the "individual archive" pages to only search for items within that category. So if I was in the page that was only viewing "Restaurant" posts the search results will only display other restaurants, instead of displaying the results for every category?

I will be trying to mess around with this to get it working but any suggestions are welcomed!

Thanks!

cyberhobo commented 12 years ago

Make you own search form template based on search-form-default.php. Instead of using the comma separated category ids from the widget, make your own hidden input with the category id you want.

trewknowledge commented 12 years ago

Will this also work with taxonomy terms instead of categories?

cyberhobo commented 12 years ago

There are some limitations in that case - the same mentioned in issue #2.