Shortcodes
WP ImmoSync includes various shortcodes to serve multiple purposes. You will find the details and usage of each shortcode in this documentation.
Gutenberg blocks
Section titled “Gutenberg blocks”The following shortcodes are also available as Gutenberg blocks in the ImmoSync inserter category. Shortcodes remain supported (PHP themes, Grid Builder, Classic editor).
| Block | Shortcode | Notes |
|---|---|---|
| ImmoSync Form | [wpis-form-contact], [wpis-form-estate], [wpis-form-evaluation] |
One block. Choose the form kind in the sidebar. |
| ImmoSync Details list | [wpis-details-list] |
Needs an estate/project post context (property editor, Query Loop, or single template). |
| ImmoSync Value | [wpis-value] |
Same: uses the current property when the template is viewed. |
| ImmoSync Label | [wpis-label] |
Same post context as Value. |
[wpis-group] and [wpis-estate-listing] stay shortcodes-only.
Estate, project, and agent post types are exposed in the WordPress REST API so they can be edited in Gutenberg. Custom wpis_* post meta is not registered in REST; block HTML is rendered on the server.
Estates properties and data
Section titled “Estates properties and data”[wpis-details-list]
Section titled “[wpis-details-list]”This shortcode will generate a list of property labels and values grouped by collection. The shortcode contains pre-defined collections and can create a list with your wpis properties.
The labels and unit translation are automatically handled based on the WordPress current language (available languages: EN, FR, NL)
The generated code will have a default class to style each element the way you want.
Example
<ul class="wpis-detail-list collection-energy"> <li> <span class="label label-energy_epcValue">Mesure énergétique</span> <span class="value value-energy_epcValue" >339 <span class="unit"> kWh/m²/an</span> </span> </li> <li> <span class="label label-energy_gazEmit">Emission de gaz</span> <span class="value value-energy_gazEmit" >339 <span class="unit"> Kg/CO2/an</span> </span> </li></ul>Parameters :
Section titled “Parameters :”collection
- Define the collection to use
- Optional ONLY if
propertiesparameter is used - Available collection :
general,energy,configuration
exlude :
- Set properties to exlude separated by a “
,” - Optional
properties :
- Define which property to use separated by a “
,” - Optional
Usage :
Section titled “Usage :”Example 1
Simple usage of a collection
[wpis-details-list collection="general" /]
// Will return the list of properties from the collection `general`Example 2
Exlusion of some properties from an existing collection
[wpis-details-list collection="general" exclude="finance_price, address_city" /]
// Will return the list of properties from the collection `general` without the exluded propertiesExample 3
Creation of a custom list based on choosen metas
[wpis-details-list metas="id, finance_price, energy_epcLabel" /]
// Will return a custom list based on the metas defined[wpis-label]
Section titled “[wpis-label]”This shortcode will return a label from a given wpis metadata.
The translation is automatically handled based on the WordPress current language (available languages: EN, FR, NL)
Parameters :
Section titled “Parameters :”wrap
- Let you define content that will wrap the label.
- The parameter
%sis replaced automatically by the label. - The parameter
%sis mandatory if thewrapparameter is used. - Optional
Usage :
Section titled “Usage :”Example 1
Basic usage
[wpis-label meta="finance_price" /]
// Will return the label `Price`Example 2
Usage with wrap parameter
[wpis-label meta="finance_price" wrap="<span class='my-label-price'>%s</span>" /]
// Will return the label <span class="my-label-price">Price</span>Example 3
Usage with content wrapper
[wpis-label meta="finance_price"]<span class="my-label-price">%s</span>[/wpis-label]
// Will return the label <span class="my-label-price">Price</span>[wpis-value]
Section titled “[wpis-value]”This shortcode will return a value from a given wpis metadata. The value will be returned pre-formatted and with a unit when the data requires it.
Parameters :
Section titled “Parameters :”meta
- Used to define which wpis meta property to return
- Accepted values are any wpis property available in the plugin
- Mandatory
format
- Could be used to disable meta formatting or set a pre-defined filter
- Accepted parameters:
true,false,capitalize,decimal,number,price,yes/no - Default:
true - Optional
unit
- Could be used to hide the pre-defined unit
- Accepted parameter :
trueorfalse - Default :
true - Optional
wrap
- Let you define content that will wrap the label.
- The parameter
%sis replaced automatically by the label. - The parameter
%sis mandatory if thewrapparameter is used. - Optional
Usage :
Section titled “Usage :”Example 1
Basic usage
[wpis-value meta="areas_total" /]
// Will return `85,00 m²`Example 2
Disable format
[wpis-value meta="areas_total" format="false"/]
// Will return `85 m²`Example 3
Disable format
[wpis-value meta="areas_total" format="false"/]
// Will return `85 m²`Example 4
Overriding format and disable unit
[wpis-value meta="areas_total" format="price" unit="false" /]85 €// Will return `85 €`Example 5
Disable formatting and unit
[wpis-value meta="areas_total" format="false" unit="false" /]// Will return `85`Example 6
Usage with wrap parameter
[wpis-value meta="areas_total" format="false" unit="false wrap="It's %s meters squared"/]// Will return `It's 85 meters squared`Example 7
Usage with content wrapper
[wpis-value meta="areas_total" format="false" unit="false"]It's %s meters squared[/wpis-value]// Will return `It's 85 meters squared`[wpis-group]
Section titled “[wpis-group]”This shortcode will multiple values from a defined set of wpis metadata separated by a space or a custom separator. The value will be returned pre-formatted and with a unit when the data requires it.
Parameters :
Section titled “Parameters :”metas
- Used to define a set of wpis meta property to return separated by a “
,” - Accepted values are any wpis property available in the plugin
- Mandatory
separator
- Use to define the separator to use between values
- Default: “``”
- Optional
skip-zero
- Use to skip value equals to zero
- Accepted parameters:
true,false - Default:
false - Optional
format
- Could be used to disable meta formatting
- Accepted parameters:
true,false - Default:
true - Optional
unit
- Could be used to hide the pre-defined unit
- Accepted parameter :
trueorfalse - Default :
true - Optional
wrap
- Let you define content that will wrap the label.
- The parameter
%sis replaced automatically by the label. - The parameter
%sis mandatory if thewrapparameter is used. - Optional
Usage :
Section titled “Usage :”Example 1
Mutiple values with a custom separator
[wpis-group metas="areas_bedroom1, areas_bedroom2, areas_bedroom3, areas_bedroom4, areas_bedroom5" separator=" - "]// Will return `14,00 m² - 11,00 m² - 4,00 m² - -`Example 2
Mutiple values with a custom separator, no formatting and skip zero values
[wpis-group metas="areas_bedroom1, areas_bedroom2, areas_bedroom3, areas_bedroom4, areas_bedroom5" separator=", " format="false" unit="true" skip-zero="true"/]// Will return `14 m², 11 m², 4 m²`Example 3
Mutiple values with a custom separator, no formatting and skip zero values and parameter
[wpis-group metas="areas_bedroom1, areas_bedroom2, areas_bedroom3, areas_bedroom4, areas_bedroom5" separator=", " format="false" unit="true" skip-zero="true" wrap="Surface Chambres : %s"/]// Will return `Surface Chambres : 14 m², 11 m², 4 m²`Example 4
Mutiple values with a custom separator and content wrapper
[wpis-group metas="address_longitude, address_latitude" separator="; "]<div class="geo">%s</div>%s…[wpis-group]// Will return `<div class="geo">4.419409; 50.81194</div>`Form HTML, emails, and wpis-forms.js can be overridden from the active theme. See Theme templates.
JavaScript events
Section titled “JavaScript events”When a visitor submits an ImmoSync form, the plugin dispatches two bubbling CustomEvents on the <form> element. Themes can listen on document without copying wpis-forms.js.
Both events expose the submitted form input in event.detail. Security fields (_wpis_token, website) are omitted. event.target is the form element.
| Event | When it fires |
|---|---|
wpis_form_submission |
As soon as the form is submitted, before the request is sent |
wpis_form_success |
After the server accepted the submission |
event.detail includes:
formId— form elementid(wpis-form-contact-default,wpis-form-contact-extended,wpis-form-evaluation, orwpis-form-estate)source—contactForm,evaluationForm, orestateFormurl— page URL at submit timegender,firstname,lastname,email,phone,messageaddressStreet,addressNumber,addressBox,addressZip,addressCityon extended contact and evaluation formslistIdwhen a contact list is setestateId,postIdon the estate form
Theme usage
Section titled “Theme usage”Enqueue a small script from the active theme (or child theme). The listener can be registered on document at any time before submit:
add_action('wp_enqueue_scripts', function () { wp_enqueue_script( 'mytheme-immosync-forms', get_stylesheet_directory_uri() . '/js/immosync-forms.js', [], wp_get_theme()->get('Version'), true );});document.addEventListener('wpis_form_submission', function (event) { var data = event.detail;
// Example: Google Tag Manager / analytics window.dataLayer = window.dataLayer || []; window.dataLayer.push({ event: 'wpis_form_submission', formId: data.formId, source: data.source, email: data.email, });});
document.addEventListener('wpis_form_success', function (event) { var data = event.detail;
window.dataLayer = window.dataLayer || []; window.dataLayer.push({ event: 'wpis_form_success', formId: data.formId, source: data.source, email: data.email, estateId: data.estateId, });});You can also run custom theme logic on success (redirect, extra confirmation, CRM pixel, and so on):
document.addEventListener('wpis_form_success', function (event) { var data = event.detail;
if (data.source === 'estateForm') { console.log('Lead for estate', data.estateId, data); }});[wpis-form-contact]
Section titled “[wpis-form-contact]”This shortcode generate a form used for contact purpose. The contact will be sync with Wordpress and send via ImmoSync to the real estate software.
Parameters :
Section titled “Parameters :”type
- Used to determine if the form should be default or extended. Extended will add some additional form input related to the address
- Accepted parameters:
default,extended - Default:
default - Optional
style
- Used to enable or desable default style applied to the form
- Accepted parameters:
on,off - Default:
on - Optional
submit
- Used to override the default text of the submit button
- Accepted value:
sting - Default:
Send - Optional
list-id
- Used to inject a contact list ID.
- Accepted value: contact list ID from Whise software.
- Default: -1 (no contact list ID)
- Optional
Usage :
Section titled “Usage :”Example 1
Default contact form
[wpis-contact-form /]Example 2
Extended contact form
[wpis-form-contact type="extended"]Example 3
Extended contact form without default style applied
[wpis-form-contact type="extended" style="off"]Example 4
Form contact with custom submit text
[wpis-form-contact submit="My custom text"][wpis-form-evaluation]
Section titled “[wpis-form-evaluation]”This shortcode generate a form used for evaluation purpose. The contact will be sync with Wordpress and send via ImmoSync to the real estate software.
Parameters :
Section titled “Parameters :”style
- Used to enable or desable default style applied to the form
- Accepted parameters:
on,off - Default:
on - Optional
submit
- Used to override the default text of the submit button
- Accepted value:
sting - Default:
Send - Optional
list-id
- Used to inject a contact list ID.
- Accepted value: contact list ID from Whise software.
- Default: -1 (no contact list ID)
- Optional
Usage :
Section titled “Usage :”Example 1
Simple evaluation form
[wpis-form-evaluation /]Example 2
Form without default style
[wpis-form-evaluation style="off"]Example 3
Form evaluation with custom submit text
[wpis-form-evaluation submit="My custom text"][wpis-form-estate]
Section titled “[wpis-form-estate]”This shortcode generate a form used for estate interest. The form will determine the context and send the estate ID and details by email to the client and recipient. The contact will be sync with Wordpress and send via ImmoSync to the real estate software.
Parameters :
Section titled “Parameters :”style
- Used to enable or desable default style applied to the form
- Accepted parameters:
on,off - Default:
on - Optional
submit
- Used to override the default text of the submit button
- Accepted value:
sting - Default:
Send - Optional
estate-id
- Used to inject an estate ID. Takes priority over the ID detected from the current estate page.
- Accepted value: estate ID
- Default: detected from the current post meta
wpis_id - Optional. Required if the shortcode is not used on an estate page.
list-id
- Used to inject a contact list ID.
- Accepted value: contact list ID from Whise software.
- Default: -1 (no contact list ID)
- Optional
Usage :
Section titled “Usage :”Example 1
Simple estate form
[wpis-form-estate /]Example 2
Form estate without default style
[wpis-form-estate style="off"]Example 3
Form estate with custom submit text
[wpis-form-estate submit="My custom text"]Example 4
Form estate with an explicit estate ID (overrides the current page)
[wpis-form-estate estate-id="12345"]