How To Search By MLS ID In A Shortcode
By Matt Williams
Recently, one of my newer colleagues asked if there was a way to create a Search Form shortcode so you can search by MLS ID. The answer, as with most of these questions is YES, Absolutely! To find out how, watch this video. For more details on exactly what I did, read on below the video.
Getting this Search Form shortcode was really easy. All you need to do is create a Shortcode template for a Search Form. That template needs to include the following tag:
[custom attribute=mls_id group=rets]
This says to create a text box bound to mls_id which is in the rets group. My entire template from the video looks like this:
<div class="search-item"> <label>Min Beds:</label>[min_beds] </div> <div class="search-item"> <label>Min Baths:</label>[min_baths] </div> <div class="search-item"> <label>Min Price:</label>[min_price] </div> <div class="search-item"> <label>Max Price:</label>[max_price] </div> <div class="search-item"> <label>MLS ID:</label>[custom attribute=mls_id group=rets] </div> <div class="search-item "> <input type="submit" name="submit" value="Search Now!"> </div>
After you create the template, then use it on a new Search Form Shortcode. Finally place that shortcode on a page on your site. That’s it, you are done.
If any of this wasn’t clear or you have successfully used this, let us know in the comments below. If you have ideas for other posts like this, let us know that too.
Published on September 23, 2013
Written by Matt Williams
I am all about getting developers excited and efficient at using the Placester platform. To achieve this, I write blog posts, film videos, create code samples, and answer all of the more technical questions that come in our our support lines. Before joining the team at Placester, I held similar roles at Yottaa, Open Text, Microsoft, along with consulting roles at Oracle, Sun, Intel, IBM, and many others.