Blog

How To Search By MLS ID In A Shortcode

By Matt Williams

Developers

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.

Comments

Get our Newsletter
Follow Placester