Getting started
Manual data entry
Menu
Getting started
Manual data entry
Templating Properties search

Properties search

Last updated: December 12, 2025

The [rentfetch_propertysearch] shortcode (typical usage documentation) displays a property search interface with filters, results list, and interactive map. Unlike the static [rentfetch_properties] grid (usage and customization documentation), this shortcode has two separate templates for displaying each property: one for the results list and one for the map popups.

Default Hook Structure

The shortcode renders results using two containers:

  • .property-in-list – calls do_action( 'rentfetch_do_properties_each_list' )
  • .property-in-map – calls do_action( 'rentfetch_do_properties_each_map' )

Complete Layout Replacement for List View

To replace the entire property layout in the results list:

<?php
remove_action( 'rentfetch_do_properties_each_list', 'rentfetch_properties_each_list' );

function hello_world_list() {
    echo '<div>Hello World List</div>';
}
add_action( 'rentfetch_do_properties_each_list', 'hello_world_list' );

Complete Layout Replacement for Map View

To replace the entire property layout in the map popups:

<?php
remove_action( 'rentfetch_do_properties_each_map', 'rentfetch_properties_each_map' );

function hello_world_map() {
    echo '<div>Hello World Map</div>';
}
add_action( 'rentfetch_do_properties_each_map', 'hello_world_map' );

Available Data Functions

Use these functions to retrieve property data (there are many others available in functions-properties.php)

Basic Information:

  • rentfetch_get_property_title() – Property title
  • rentfetch_get_property_location() – Full address/location
  • rentfetch_get_property_city_state() – City, State format

Property Details:

  • rentfetch_get_property_bedrooms() – Bedroom range
  • rentfetch_get_property_bathrooms() – Bathroom range
  • rentfetch_get_property_square_feet() – Square footage
  • rentfetch_get_property_pricing() – Rent information
  • rentfetch_get_property_availability() – Available units count

Additional Features:

  • rentfetch_get_property_specials_from_meta() – Special offers
  • rentfetch_get_property_tour() – Tour availability indicator
  • rentfetch_get_property_permalink() – Property page URL
  • rentfetch_get_link_target( $url ) – Link target attribute

CSS Classes and Structure

  • List items are wrapped in .property-in-list
  • Map items are wrapped in .property-in-map (hidden by default)
  • Both inherit classes from get_post_class() filtered through rentfetch_filter_properties_post_classes
  • Map items include data-latitudedata-longitudedata-id, and data-marker-id attributes

Best Practices

  1. Keep Map Layouts Simple: Map popups should be concise due to space constraints
  2. Maintain Data Attributes: Preserve latitude/longitude data for map functionality
  3. Test Both Views: Ensure layouts work in both list and map contexts
  4. Use Semantic HTML: Maintain proper heading hierarchy and accessibility
  5. Handle Missing Data: Check for empty values before outputting content

This dual-template system allows for optimized layouts for both the detailed list view and the compact map popup view.

Take Your Apartment Website to the Next Level

Whether for an entire portfolio or a single property, get completely setup and sync new property info & floor plan data in 10 minutes or less.

Trusted By

Cowboy Partners

Brickstone

Four Star

StreetLights

Richmark

Gates Hudson

Try Rent Fetch Today

We offer a 30-day, money-back guarantee.