OpenImmo2WP #SnipOTW: Adding Section Headlines to Property Descriptions

(c) fotogestoeber - fotolia.comWe’ve designed our OpenImmo2WP plugin for WordPress with one core target in mind: It should be the simplest solution possible for mastering the complex task of frequently importing OpenImmo data.

We’ve achieved this by providing ready-made data mapping tables and specialized interface code for every supported theme/plugin alongside with limiting the number of configuration options to a minimum to reduce complexity. (Of course, we’re still constantly optimizing the software to make it even simpler.)

The mappings of OpenImmo elements to their respective theme-specific custom fields can be adjusted without coding by simply editing the default mapping table with a spreadsheet application like LibreOffice Calc and exporting it as CSV file.

However, there might be cases when a more individual processing of the import data is required. Here, custom functions come into play that can be hooked to the various filter/action events the plugin provides to control almost every detail of the import process.

Since the beginning of our “WordPress OpenImmo journey”, we’ve created many of these functions with highly diverse goals for our plugin users. This way, a (still growing) set of best practice examples has developed over time.

Starting with this post, we finally start to share these examples based on a weekly blog article series, which we call

“Snippet of the Week” (or #SnipOTW for short)

So let’s start with a classic: Most real estate themes don’t provide separate text fields for describing the property, location and amenities. Hence, these OpenImmo details are usually concatenated into one single text that’s being saved as main property description during import.

By default, the combined sections don’t include headlines or other separation elements. This can be changed by adding the following two filter functions to the functions.php of the (child) theme in use (or another suitable file):

If required, each section can also be wrapped in its own element:

That’s it! Please add a comment if you have any questions or remarks.

Image © fotogestoeber – fotolia.com

Leave a Reply

Your email address will not be published.

*