The ESPC-BLM WordPress plugin provides a simple way to list and format properties on your WordPress website. It uses the BLM property feed provided by ESPC to show properties currently active in your BDP account live, from the BLM file provided.

The ESPC BLM plugin does not provide any sophisticated content management or contact management features — property detail pages are not created as pages or posts in WordPress and you can’t edit or process them separate to their record in BDP. When the property is marked as inactive and removed from external feeds (including the BLM feed), the property will instantly disappear from your website.

Aside from those limitations, though, the ESPC BLM plugin is a quick, simple and efficient way to get a simple property listing onto a wordpress website and should be considered suitable for most simple website requirements. A moderately technical WordPress developer will be able to add search or filter options to the main property list, for example.

If you have further or more advanced requirements, such as an overarching SEO or social media strategy, or additional complex search and filter requirements, then ESPC also provides support and extension plugins to the PropertyHive plugin which may prove to be more suitable, and includes support for Elementor page builder, the ContactForm 7 forms plugin, and other useful utilities.

Setup and Installation

  1. Download the latest version of the plugin from the main plugin repository:
    https://assets.espc.com/wordpress/espc-blm/espc-blm-latest.zip
  2. Upload and install it in your WordPress plugins settings.
  3. From the plugin information page, enter the ESPC BLM settings page:
    ESPC-BLM Plugin
  4. There are two settings that you need to specify in order to property configure the plugin.
    1. The URL of the BLM feed that you will use to display your properties. This will be provided for you by BDP or ESPC Support.
    2. The path to the property details page on your website, that will include a detailed description of the property. This is used by the templating system to generate links from property lists to the detailed property view.
      ESPC-BLM Settings

Showing Properties on your site

The ESPC BLM plugin contains two shortcodes, that you can use to display either a list of relevant properties, or a detailed view of a single property. Add these to the content of any page where you would like properties to be displayed.

[espc_property_list] will display a list of properties in the BLM file.

[espc_property_detail] will display a single property based upon a property id passed in the Page URL.

Templating

Template overview

The ESPC BLM plugin comes with a default template layout that will render a three-column tiled layout for property listing, and a two-column details page, using bootstrap. You will likely want to develop your own templates to match the look and feel of your site.

Before you edit any templates, create local copies in your current wordpress theme. That way, plugin updates won’t affect the designs you build.

There are three sample template files, located in the espc-blm/assets/templates directory within the plugin source. Copy these files into an espc-blm directory within your current theme and use them as a starting point for your own templates.

  • property-detail.html is the detailed view of a property, rendered by the espc_property_detail shortcode
  • property-list.html is the template that controls the list of properties that are viewed in the espc_property_list plugin. Each property is then rendered using the
  • property-list-item.html template

ESPC BLM templates follow a format very similar to the handlebars templating language:
     Output a variable directly by wrapping it in {{ … }} , e.g. {{ $p[‘DISPLAY_ADDRESS’] }}
     Write embedded PHP code inside {% … %} delimiters, e.g. {% if(test) { … } %}

Template Selection

You can use multiple property templates on your site, and specify them in the relevant short codes.

Specify the list and list item templates in the espc_property_list shortcode with the list_template and detail_template attributes, for example:

      [espc_property_list
           list_template="custom_template"
           detail_template="custom_detail_view"
      ]

Will load the templates called “custom_template.html” and “custom_detail_view.html”.

There is only one template used in the detailed property view, which can be set using the template attribute:

      [espc_property_detail template="custom_detail_view"]

By default, the generated property detail link includes a query string prop parameter that stores the unique AGENT_REF blm property. This is picked up from the page URL by the espc_property_detail shortcode, and this is how the property to display is selected. If the query string parameter name changes from prop, specify it in the shortcode here, with the param shortcode attribute, e.g.:

      [espc_property_detail param="property_id" template="custom_detail_view"]]

Property Listings Template

The master property lsitings template will loop through all the avialble properties, and display each one.

Each property includes an html field, that is the rendered property item template.

      <div class="row">
      {% foreach($properties as $property): %}
           {{ $property->html }}
      {% endforeach %}
      <div>

If you would like to sort or filter properties before display, the BLM record is available in the data field and you may use this to change the list of properties. For instance, to only display properties with an EH2
outcode, you could create a custom template that looks like this:

      <div class="row">
      {% foreach($properties as $property): %}
           {% if $property->data[‘POSTCODE1’] == ‘EH2’: %}
                {{ $property->html }}
           {% endif %}
      {% endforeach %}
      <div>

Property List Item Template

Each property in the BLM list is rendered using a property list item template. All the data in the BLM file is available in this template, in the $p variable, e.g. $p[‘PRICE’] contains the property price.

Refer to BLM documentation for the standard field available in a BLM record.

In addition to the BLM record, the $link variable contains the link to the property detail page, as specified in the plugin settings page.

To simplify some standard BLM fields, a $lookups helper object is also made available, to translate between indexed values and plain english equivalent:

Lookup Returns
$lookups->basis[$p['PRICE_QUALIFIER']] Fixed Price, Offers Over, etc.
$lookups->availability[$p['CURRENT_STATUS']] For Sale, Sold, Under Offer etc.
$lookups->types[$p['PROP_SUB_ID']] Flat, House, Cottage, etc.
$lookups->tenure[$p['TENURE_TYPE_ID']] Freehold, Leasehold etc.

Property Detail Template

The detailed template view contains the same $p BLM record and $lookups helper as the list item template.

Refer to the example template provided in the assets/templates for more detail.