The Open House theme features an advanced search box where you can perform a specific search for a property based on location, number of bedrooms, bathrooms, minimum, maximum price, and property type.
The Locations, minimum price, maximum price, and Property Type need to be configured. This page details how to do that.
Searching by location is quite powerful. Before going through this, please check out the theme demo to review how it functions. This tutorial will make more sense. When you click on the main “Location” dropdown, a dropdown of all the U.S. states appears. (This can be changed to anything you like). Because U.S. States is quite general, you may want to narrow down the location a bit. So choose a state from the list. In a couple seconds another dropdown menu appears with more specific locations in the selected state. In the demo, state Counties are shown. Again, this can be changed to meet your needs.
In this documentation, i refer to the first Location dropdown as “Primary search location”, and I refer to the second location dropdown as “Secondary search location”.
Keep in mind that the Secondary Search Location is optional, and is only needed if your Primary Search Locations are large in scope.
In Appearance ->Theme Options -> General, you will see a section to enter your Primary Search Locations. By default you’ll see all 50 U.S. States. But feel free to change it to however general or specific you need. For example, countries, regions, cities, zip codes, etc. Enter each location on a separate line.
If you will only have the Primary Search Locations (not the Secondary Search Locations), then in Appearance -> Theme Options -> General section, be sure to “disable” the Secondary Search Locations.
First, in Appearance -> Theme Options -> General section, be sure to enable “Secondary Search Locations”.
This part is relatively tricky, so I think the best way to learn how this works is to look at the demo. As I have mentioned a few times, the Primary Search Locations default to U.S. States. So in this tutorial I will assume you have the same. Lets choose a State: California, as an example. When you click on California, a secondary listbox appears with “Counties” in California. Where are the counties for California stored? They are in a folder called /secondary_search_locations, right in the root of your site. Go in that folder, and you’ll see some text (.txt) files, each one corresponding to a State. The Counties for California are in the California.txt file. Note how “California” is spelled exactly the same as it is in the Primary Search Locations in “Theme Options”. Open that file. You’ll see each County is on it’s own line. Follow the same code format to add or edit the locations.
The key here is that each text (.txt) file must be in the /secondary_search_locations folder and must have the EXACT SAME NAME (case sensitive) as it’s name in the Primary Search Locations list that you set in Theme Options.
Remember, the theme is set to States and Counties, but you will probably have to customize this to your own needs. I think now that we saw how the California state works, that you will be able to create your own Primary and Secondary Search Locations.
Using this structure of Primary and Secondary Locations is very flexible, and is by far the most powerful search location feature on Themeforest.
[toggle title=”Customizing the Max and Min Price”]
For theme version 2.7 or higher, enter the price levels to be used in the Min and Max prices dropdowns in the Search, in Appearance -> Theme Options -> General -> Price Levels. There is a section for prices for Buy (non-rentals) and for rentals. Leave the rentals one blank if you aren’t using the Buy or Rent dropdown in your search.
If you’re using a theme version OLDER than 2.7, you must edit some html manually. Open the /includes/custom/customsearchformfields.php file . You’ll see 2 chunks of HTML labeled Minimum Price and Maximum Price. Don’t edit the FIRST entry of each dropdown. But other than that, you’re free to edit the numbers of any of the other lines. Note: for the “value”, make sure the numbers do NOT include decimals, commas, or currency symbols. And for the number between the
tags, you CAN include commas and decimals, but do NOT include the currency symbol. That is added automatically.
[toggle title=”Editing the Property Types”]
By default, the Search allows you to search by Property Types of Single Family, Townhome, Condo, and Apartment. But you can easily edit this list. In Appearance ->Theme Options -> General -> Propert Types, enter each property type on a new line. Make sure to not have any blank entries.