Forums

Can you make two specific search fields searching through different things (6 posts)

  1. Icethrill
    Member
    Posted 2 months ago #

    So I want the normal search field in the sidebar(I have that already) but the problem is I want another one that searches through a specific category. So that the other search field gets results from THAT category only.

    Is it a possibility to have two search fields doing two radically different things?

  2. richarduk
    Member
    Posted 2 months ago #

    Off the wall reply, but have you considered google or atomz? Don't don't what the set up is, but prepared to bet you can limit site-search to specific parts of site

  3. Icethrill
    Member
    Posted 2 months ago #

    No I have not considered that, how I want it to be is that when you are on Page X for example. The special searchfield is gonna show up, that is just gonna search through ONE category.

  4. richarduk
    Member
    Posted 2 months ago #

    http://www.zirona.com/software/wordpress-advanced-search/

    ?? Plugin - limits search to specified categories; probably some code to enter on a specified page or category template

  5. t31os_
    Member
    Posted 2 months ago #

    You can search by category if you like without the need for plugins.

    I posted some example code in another thread for creating a search that can search based on category or post/page.
    http://wordpress.org/support/topic/304950?replies=24

    The pastebin is here.
    http://wordpress.pastebin.com/f24b1ee9e

    It's still a work in progress (it's code i've written for my test install), but it will work for doing per category searchs... take what you will from it..

    This code goes into your theme search.php (update HTML as appropriate). The commented section at the bottom is from my searchform, you'll need to remove the onclick="removeText(this);" code from the form (that's specific to a small Javascript i use to remove the search text when it's clicked) but you can use the rest as a basis to display a search that will work for categories etc...

  6. Icethrill
    Member
    Posted 2 months ago #

    thanks will give it a look

Reply

You must log in to post.

About this Topic