WP Immo Sync
Theme template overrides
Customize ImmoSync form HTML, form emails, and form JavaScript from your WordPress theme without editing the plugin.
You can override:
- shortcode form markup (
[wpis-form-contact],[wpis-form-estate],[wpis-form-evaluation]) - email bodies (agency notification and visitor confirmation) and the shared HTML layout
- form JavaScript (
wpis-forms.js)
Override only the files you need. Missing theme files fall back to the plugin defaults.
Resolution order
Form HTML, email HTML, and wpis-forms.js all resolve in this order:
- Child theme (
get_stylesheet_directory()) - Parent theme (
get_template_directory()), if different - Plugin default
Form templates
Override the HTML rendered by the form shortcodes.
You can override:
- the contact form (
[wpis-form-contact]) - the contact extended form (
[wpis-form-contact type="extended"]) - the estate form (
[wpis-form-estate]) - the evaluation form (
[wpis-form-evaluation])
Setup
In your active theme (or child theme), create:
immosync/form/Then add only the files you want to customize:
| Theme file | Overrides | Shortcode |
|---|---|---|
immosync/form/contact.html |
contact.default.form.html |
[wpis-form-contact] |
immosync/form/contact-extended.html |
contact.extended.form.html |
[wpis-form-contact type="extended"] |
immosync/form/estate.html |
estate.default.form.html |
[wpis-form-estate] |
immosync/form/evaluation.html |
evaluation.default.form.html |
[wpis-form-evaluation] |
Example:
your-theme/
immosync/
form/
contact.html
contact-extended.html
estate.html
evaluation.htmlIf a file is missing in the theme, the plugin default under plugin/templates/form/ is used. You can override one form and leave the others alone.
How to start
- Copy the matching plugin file into your theme path (rename as in the table above).
- Edit the copy.
- Reload a page that uses the shortcode to verify the markup.
Plugin sources to copy from:
plugin/templates/form/contact.default.form.html→immosync/form/contact.htmlplugin/templates/form/contact.extended.form.html→immosync/form/contact-extended.htmlplugin/templates/form/estate.default.form.html→immosync/form/estate.htmlplugin/templates/form/evaluation.default.form.html→immosync/form/evaluation.html
Placeholders
Translated labels and messages use Mustache-style tags replaced by the shortcode, for example:
{{ form.gender.label }},{{ form.firstname.label }},{{ form.lastname.label }}{{ form.email.label }},{{ form.phone.label }},{{ form.message.label }}{{ form.policy.label }},{{ form.policy.value }},{{ form.submit.value }}{{ message.success }},{{ message.processing }}{{ error.single }},{{ error.multiple }}
Address fields (extended contact / evaluation) also use {{ form.addressStreet.label }}, addressNumber, addressBox, addressZip, addressCity.
Estate form only
These tokens are replaced by the shortcode:
%estateId%— from theestate-idattribute when set, otherwise from the current estate page%postId%— current post ID
Keep them in your override if the form must still target the correct estate.
Security fields
The plugin injects a CSRF token (_wpis_token) and a hidden honeypot (website) before </form> on render. Theme copies may include the same markup; the plugin strips duplicates and writes a fresh token.
Keep the original id attributes on visible fields. Do not rename _wpis_token or website.
Each check (and its timing) can be disabled or overridden from the theme wpis-settings.json file. See Theme settings.
Limits
- Shortcode attributes still apply (
style,submit,type,estate-id). type="extended"loadscontact-extended.htmlwhen present; otherwise the plugin extended template.- Form submission JS and API behavior are unchanged by these HTML overrides.
- Important: The form tag and each form input must keep its original
idattribute unchanged so plugin JS can find and process the fields correctly. - Filter hook for advanced use:
wpis_form_template_path.
Email templates
Customize ImmoSync form emails from your WordPress theme without editing the plugin.
You can override:
- the client notification body (message sent to the agency / admin)
- the recipient confirmation body (message sent to the visitor)
- the blocked-submissions weekly report body
- the shared HTML layout wrapping those bodies
Setup
In your active theme (or child theme), create:
immosync/email/Then add only the files you want to customize:
| Theme file | Overrides |
|---|---|
immosync/email/client-content.html |
content/client-email.html |
immosync/email/recipient-content.html |
content/recipient-email.html |
immosync/email/blocked-report-content.html |
content/blocked-report-email.html |
immosync/email/template.html |
default.email.html |
Example:
your-theme/
immosync/
email/
client-content.html
recipient-content.html
blocked-report-content.html
template.htmlIf a file is missing in the theme, the plugin default under plugin/templates/email/ is used. You can override one file and leave the others alone.
How to start
- Copy the matching plugin file into your theme path (rename as in the table above).
- Edit the copy.
- Submit a form to verify the email output.
Plugin sources to copy from:
- Body (client):
plugin/templates/email/content/client-email.html→immosync/email/client-content.html - Body (recipient):
plugin/templates/email/content/recipient-email.html→immosync/email/recipient-content.html - Body (blocked report):
plugin/templates/email/content/blocked-report-email.html→immosync/email/blocked-report-content.html - Layout:
plugin/templates/email/default.email.html→immosync/email/template.html
Placeholders (body templates)
Simple values (replaced as text):
{{ firstname }},{{ lastname }},{{ email }},{{ phone }},{{ message }}{{ source }},{{ url }}- Address:
{{ addressStreet }},{{ addressNumber }},{{ addressBox }},{{ addressZip }},{{ addressCity }} - Search:
{{ searchPurpose }},{{ searchCategory }},{{ searchPriceMin }},{{ searchPriceMax }},{{ searchRooms }},{{ searchAreaMin }},{{ searchAreaMax }},{{ searchZips }} - Estate:
{{ estateId }},{{ estateReference }},{{ estateName }} - Blocked report:
{{ siteName }},{{ total }},{{ periodStart }},{{ periodEnd }},{{ blockedTable }}
Conditional sections (content inside is kept only when the condition is truthy):
{{#address}}
...
{{/address}}
{{#search}}
...
{{/search}}
{{#estate}}
...
{{/estate}}Placeholders (layout template)
Your layout file must include these tokens:
{{ email.headline }}{{ email.message }}— rendered body content{{ email.signature }}{{ email.footer }}
Limits
- Subject lines and From / To addresses stay controlled by plugin settings, not by these templates.
- Filter hook for advanced use:
wpis_email_template_path.
Form JavaScript (wpis-forms.js)
To customize form behaviour or appearance in JavaScript, copy the plugin script into the root of the active theme (or child theme):
your-theme/wpis-forms.jsPlugin source to copy from:
plugin/dist/client/wpis-forms.js→wpis-forms.js
The same resolution order applies (child theme, then parent theme, then the plugin file). The theme copy is versioned with filemtime so browsers pick up edits.
Filter hook for advanced use: wpis_forms_script.
HTML template overrides do not change this script. Override wpis-forms.js only when you need different client-side behaviour.
Related
- Theme settings — override plugin options (including form security checks) from
wpis-settings.json - Shortcodes — form shortcode attributes and usage