Skip to content

Customizing the List View Subtitle

The subtitle appears in the list view below the property title and displays supplementary location information, for example: “10117 Berlin, Apartment for Rent”. By default, it contains the postal code, city, property type, and — in the detail view — the marketing type.

Subtitle setting in the WP-ImmoMakler Child-Skin-Plugin

If you want the subtitle to also display the street and house number — for example, “Musterstrasse 12, Berlin-Prenzlauer Berg” instead of just “Berlin-Prenzlauer Berg” — add the following filter to the functions.php of your WP-ImmoMakler Child-Skin-Plugin:

add_filter( 'immomakler_property_subtitle', function( $subtitle ) {
global $post;
$strasse = get_post_meta( $post->ID, 'strasse', true );
$hausnummer = get_post_meta( $post->ID, 'hausnummer', true );
if ( $strasse ) {
$address = trim( $strasse . ' ' . $hausnummer );
$subtitle = $address . ', ' . $subtitle;
}
return $subtitle;
} );

The street and house number must be stored in the property’s metadata. These fields (strasse, hausnummer) are typically populated automatically during import from your real estate software (e.g., via OpenImmo XML).

Only make changes in the functions.php of the WP-ImmoMakler Child-Skin-Plugin. This is the only way to ensure that the code is preserved during plugin updates.