WPL shortcode filter for MLS On The Fly (sf_on_the_fly)
Posted by Kian K. on 24 September 2024 06:36 PM
|
|
Step 1: Understanding sf_on_the_fly The sf_on_the_fly shortcode parameter allows you to filter listings dynamically using OData queries. These queries can be used to filter listings based on various criteria like city, price, property type, etc. Step 2: Structure of OData Queries OData queries follow the format of {Field} {Operator} {Value}. Here are some common OData operators: ● eq:Equalto Step 3: Applying Filters Using WPL Shortcode The basic syntax of the WPL shortcode with sf_on_the_fly looks like this: shortcode Now, let's look at specific examples. Example 1: Filter Listings by City To display listings where the city is "Imperial", you can use: shortcode This OData query will fetch all properties where the city is exactly "Imperial". Example 2: Filter Listings by Price To display listings where the price is greater than or equal to $200,000: shortcode This will filter all properties that are listed for $200,000 or more. Example 3: Filter Listings by City and Price To combine filters for city and price, use the and operator: shortcode This will display properties located in "Imperial" with a list price of $200,000 or more. Step 4: Advanced Filtering You can add more complex conditions by chaining multiple filters using and or or operators. For example, to filter listings in "Imperial" where the price is greater than or equal to $200,000 and less than $500,000: shortcode Step 5: Custom Field Filtering If you want to filter based on custom fields (e.g., number of bedrooms or property type), you'll need to use the field names defined in your MLS setup. For example, to filter listings for properties with at least 3 bedrooms: shortcode Step 6: Troubleshooting
Conclusion With the sf_on_the_fly shortcode parameter, you can dynamically filter property listings using OData queries. By understanding the query structure, you can create advanced filters for city, price, and other custom fields. | |
|