Customising Templates
WP-ImmoMakler comes with its own responsive skin system based on Bootstrap 3. Several approaches are available for update-safe customisations and seamless integration into your WordPress theme.
The Child Skin
Section titled “The Child Skin”The plugin follows the WordPress child theme principle and offers its own child skin plugin. Download and activate the WP-ImmoMakler child skin before making any customisations.
The principle works as follows:
- Download, install, and activate the child skin plugin
- Copy only the template files you want to modify into the child skin directory
- Maintain the original directory structure: templates are located under
/wp-content/plugins/immomakler/skins/bootstrap3/ - All templates that are not copied will continue to be loaded from the main plugin
Important Exceptions
Section titled “Important Exceptions”functions.php: This file is loaded before the main skin, allowing you to override functions within it.
immomakler.css: This file is loaded after the default styles. Start with an empty file and add only your own styles. Do not copy the entire original CSS file.
Methods for Theme Integration
Section titled “Methods for Theme Integration”Method 1: Customise Header and Footer
Section titled “Method 1: Customise Header and Footer”Copy header.php and footer.php into your child skin and adjust the wrapping HTML containers to match your theme. Compare the source code of other pages in your theme to identify any missing HTML wrappers.
Method 2: Direct Theme Integration
Section titled “Method 2: Direct Theme Integration”For a permanent integration, you can copy the child skin files directly into your theme directory under /wp-content/themes/your-theme/immomakler/.
Developing a Custom Template
Section titled “Developing a Custom Template”In custom templates, you can access property data directly by instantiating the PropertyData class from the plugin.
Accessing Property Data
Section titled “Accessing Property Data”$property_data = new \ImmoMakler\Data\PropertyData;if ( $property_data->show( 'wohnflaeche' ) ) { echo esc_html( $property_data->get_label( 'wohnflaeche' ) ); echo $property_data->get_value( 'wohnflaeche' );}The class provides three core methods:
| Method | Description |
|---|---|
show( $key ) | Checks whether a field should be displayed (according to plugin settings) |
get_label( $key ) | Returns the configured label for the field |
get_value( $key ) | Returns the formatted field value |
Security Note
Section titled “Security Note”Use esc_html() when outputting labels and values to prevent XSS attacks, provided you are outputting the value as plain text.
Where to Place Your Template
Section titled “Where to Place Your Template”Place your custom template in the child skin under the appropriate directory (e.g. single/ for detail views, archive/ for list views) to ensure it is update-safe. Alternatively, you can place it directly in your WordPress theme under /wp-content/themes/your-theme/immomakler/.
Professional Integration Service
Section titled “Professional Integration Service”If you need assistance with theme integration, WP-ImmoMakler offers a flat-rate integration service. This includes basic template adjustments, colours, and layout changes. For more extensive customisations, an hourly service is available. Please contact our support team for details.