Getting started
Manual data entry
Menu
Getting started
Manual data entry
Templating Single-floorplans.php

Single-floorplans.php

Last updated: December 12, 2025

The single-floorplans.php template handles the display of individual floor plan pages in Rent Fetch. This template is highly customizable, allowing themes to override the entire layout or individual components.

Template Structure

The template follows a modular structure with the following main sections:

  1. Current Floorplan Info: Displays images, title, pricing, attributes, buttons, and description
  2. Units Table/List: Shows available units (only if units exist)
  3. Property Fees: Embedded fee information from the associated property
  4. Tour Embed: Virtual tour iframe if available
  5. Similar Floorplans: Related floor plans from the same property with matching bedroom count

Overriding the Entire Template

Method 1: Theme Template Override

Create a file named single-floorplans.php in your theme directory:

your-theme/
├── single-floorplans.php

Method 2: Template Filter

The plugin uses the single_template filter with high priority (99) to load templates. You can override this in your theme’s functions.php:

<?php
function my_custom_floorplan_template( $template ) {
    if ( is_singular( 'floorplans' ) ) {
        return get_template_directory() . '/custom-single-floorplan.php';
    }
    return $template;
}
add_filter( 'single_template', 'my_custom_floorplan_template', 100 );

Method 3: Overriding individual components

The template uses WordPress actions and filters for component customization. You can remove default hooks and add your own.

Building your own template

Regardless of how you build your own single-floorplans template, you’ll likely want to use some of Rent Fetch’s helpful functions for retrieving relevant information about floor plans and associated units (because you probably don’t want to write your own custom queries to retrieve all of this information by hand). Here’s a list of the main functions and hooks used in our default template:

Data Retrieval Functions

  • rentfetch_get_floorplan_specials(): Returns any special offers or promotions for the floor plan
  • rentfetch_get_floorplan_title(): Returns the floor plan title (with filters applied)
  • rentfetch_get_floorplan_bedrooms(): Returns formatted bedroom information
  • rentfetch_get_floorplan_bathrooms(): Returns formatted bathroom information
  • rentfetch_get_floorplan_square_feet(): Returns formatted square footage
  • rentfetch_get_floorplan_available_units(): Returns the number of available units
  • rentfetch_get_floorplan_links(): Returns availability and application links
  • rentfetch_get_floorplan_pricing(): Returns formatted pricing information
  • rentfetch_get_floorplan_units_count_from_cpt(): Returns total unit count from the custom post type
  • rentfetch_get_floorplan_description(): Returns the floor plan description

Property-Related Functions

  • rentfetch_get_property_fee_embed_from_floorplan_id( $floorplan_id ): Returns embedded fee information from the associated property
  • rentfetch_get_floorplan_tour_embed(): Returns the tour embed code/iframe
  • rentfetch_floorplan_tour_embed(): Outputs the tour embed (echoes the iframe)

Similar Floor Plans Functions

  • rentfetch_get_similar_floorplans(): Returns an array of similar floor plans (same property, same bedroom count)
  • rentfetch_similar_floorplans(): Outputs the similar floor plans grid

Action Hooks (with Default Functions)

  • rentfetch_do_floorplan_images:
    • Default: rentfetch_floorplan_images() – displays image gallery/slider
  • rentfetch_do_floorplan_buttons:
    • rentfetch_floorplan_default_availability_button() – availability/lease button
    • rentfetch_floorplan_default_unavailability_button() – unavailability button
    • rentfetch_floorplan_default_contact_button() – contact button
    • rentfetch_floorplan_default_tour_button() – tour scheduling button
  • rentfetch_floorplan_do_unit_table:
    • rentfetch_floorplan_unit_table() – desktop table view of units
    • rentfetch_floorplan_unit_list() – mobile accordion view of units

Filter Hooks for Headlines

  • rentfetch_single_floorplan_units_headline: Filters the “Units” section headline
  • rentfetch_single_floorplan_property_fees_headline: Filters the “Property Fees” section headline
  • rentfetch_single_floorplan_tour_headline: Filters the “Take a look around” section headline
  • rentfetch_single_floorplan_more_floorplans_headline: Filters the “Similar Floor Plans” section headline

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.