Drop Downs to specify search (4 posts)

  1. noelgreen
    Posted 6 years ago #

    I've got a real estate blog I'm working on that has two main categories of properties...
    1) for rent
    2) for sale

    In those categories are "sub" categories such as price range, bedrooms, bathroom, etc.

    I have the search set up so that you can toggle between fields for rent or sale.
    The main search field works great. You enter in a phrase, street address, etc., into the "rental" field, or the "for sale" field and if there's post in those categories that matches your text nothing is returned.

    The problem is I have drop down boxes for all the other variables under each input field. So, under the rental I have "price," "style," "bed," and "bath," and under for sale I have the same thing.

    I want it to work so that if someone types "elm" in the text field of the rental search, and then leaves everything else set to "any" they will only see results that fall under the rental category. (id = 16) And the same for the for sale category (id 17).

    This make sense?

    I've tried everything I know to try now... including adding the "name" parameter to the wp_dropdown_categories... that worked to eliminate the other things, but kept the drop downs from working at all.

    Any ideas / solutions would be great!

    [Code moderated as per the Forum Rules. Please use the pastebin]

  2. noelgreen
    Posted 6 years ago #

    You can see my code here:

  3. noelgreen
    Posted 6 years ago #

    This is a VERY popular topic... but no one seems to know how to do it...

  4. takien
    Posted 6 years ago #

Topic Closed

This topic has been closed to new replies.

About this Topic