Floor plan search
The [rentfetch_floorplansearch] shortcode displays a searchable grid of floor plans with interactive filters. It combines both the search filters and results display into a single, cohesive interface that allows users to browse and filter floor plans based on various criteria.
Basic Usage
[rentfetch_floorplansearch]
This displays all published floor plans with the default search filters enabled in your settings.
Parameters
- property_id: Limits the search to floor plans from specific properties. Accepts a single property ID or multiple IDs separated by commas.
- Example:
[rentfetch_floorplansearch property_id=p1234] - Example:
[rentfetch_floorplansearch property_id="p1234,p2345"]
- Example:
- taxonomy: Specifies a taxonomy to filter by (e.g., “floorplancategory” or “floorplantype”). When set, the corresponding filter is disabled in the UI since it’s pre-filtered.
- Example:
[rentfetch_floorplansearch taxonomy=floorplancategory]
- Example:
- term: Specifies the term(s) within the taxonomy to filter by. Used in conjunction with the taxonomy parameter.
- Example:
[rentfetch_floorplansearch taxonomy=floorplancategory term=studio]
- Example:
How It Works
The shortcode creates a complete floor plan search interface that includes:
- Search Filters: Dynamically generated filter options based on your floor plan search settings, including beds, baths, categories, types, price ranges, dates, and square footage.
- Results Grid: A responsive grid displaying floor plans that match the current filter criteria, with hover effects showing action buttons.
- REST-Powered Search: Real-time filtering without page reloads using the REST API endpoint
/wp-json/rentfetch/v1/search/floorplans. - Caching: Results are cached for 30 minutes to improve performance, unless caching is disabled in settings.
Display Behavior
- Shows all published floor plans by default
- Respects the default ordering set in Floor Plan Search settings
- Applies pricing display preferences (range vs. minimum)
- Shows unit counts unless hidden in settings
- Applies visual styling for unavailable floor plans if enabled
- Filters can be applied to show only floor plans with availability, depending on user selections