How to use Property Hive Shortcodes in WordPress

18th March 2024

What are shortcodes?

Shortcodes are a key feature when building a website in WordPress, allowing you to drop in functionality to a custom location on a page. These shortcodes and the associated functionality will most likely come from a third party plugin, allowing users to perform specific actions or embed complex functionalities into posts, pages, or widgets without the need for any coding knowledge.

They are encompassed in square brackets (i.e. [my_shortcode]) and can also have attributes and additional information passed through to them (i.e. [my_shortcode attribute1=”X” attribute2=”Y”]). The name of the shortcode and the attributes it can support will always be dictated and documented by the plugin providing the shortcode.

Shortcodes in Property Hive

In Property Hive we have a range of shortcodes available. These are all documented here and can offer a variety of output; from showing featured properties on your homepage to outputting maps.

Below you’ll find a summary of the shortcodes available in Property Hive:

Output a certain set of properties

Maybe you want to display a list of 10 properties for sale in London. Using our [properties] shortcode you can output a specific set of properties:

[properties department=”residential-sales” posts_per_page=”10″ address_keyword=”London”]

There are a whole host of attributes you can filter on (bedrooms, property type etc). This is particularly useful if you are creating landing pages for popular searches on your site.

View [properties] documentation

Output featured/hot properties

It’s not uncommon to see an agent listing featured properties on their homepage that they want to make stand out. This be achieved like so:

[featured_properties per_page=”3″]

The above would show 3 properties marked as ‘Featured‘ inside Property Hive in a random order. If 5 properties were marked as ‘Featured‘ it would pick 3 at random each time.

To confirm, properties can be marked as featured in Property Hive under the ‘marketing‘ tab of a property record.

If you’re importing properties to WordPress automatically and the agent has set a property as featured in the CRM you’re importing from, this should import into Property Hive accordingly.

View [featured_properties] documentation

Output new/recent properties

Another common sighting on an agents site is a section displaying newly listed properties. This can be achieved using the following:

[recent_properties]

This would output the latest properties that exist in WordPress ordered by the date they were put on the market.

View [recent_properties] documentation

Output similar listings

When viewing a particular property you might want to output properties that are similar to the one in question. Fortunately we have a shortcode for this too:

[similar_properties]

With this in place, properties will be displayed that have the same about of bedrooms and a price 10% either higher or lower than the property being viewed.

View [similar_properties] documentation

Output a property search form

Let’s move away from the properties themselves, and instead to the search forms that allow you to filter the properties. To include the default search form you can simply use:

[property_search_form id=”default”]

Notice that we’re passing an ‘id’ through as an attribute? This is because in Property Hive it’s possible for multiple search forms to exist; maybe you have a simple on the homepage and a more advanced one on the results page. These search forms can be managed using our free Template Assistant feature.

* Link to other search form blog post if published by the  time this one is  *

View [property_search_form] documentation

Output a Google or OpenStreetMap map showing a property’s location

On a property details page it’s easy to display where the property is exactly on a map:

[property_map]

This will use Google Maps or OpenStreetMap depending on which map provider you have opted to use in the Property Hive settings area.

View [property_map] documentation

Output a static Google map showing a property’s location

Similarly to the map shortcode above, we can also output a static Google map which is in essence just a fixed image which then links to Google Maps in a new tab when clicked:

[property_static_map]

By using this approach you can also reduce the number API calls to Google. Great if your site gets lots of hits.

View [property_static_map] documentation

Output a Google Street View showing a property

Sticking with mapping for the moment, you can also output a Google Street View embed showing the property at street level:

[property_street_view]

View [property_street_view] documentation

Output contact details for a property

We all know that the most important CTA (Call To Action) on a property details page is the ‘Make Enquiry / Book Viewing‘ functionality and getting the lead. To aid with this we’ve got a shortcode as follows:

[property_office_details]

The above will output the address, email address and telephone number of the office that the property is assigned to.

View [property_office_details] documentation

Output login and registration forms

If you’re allowing applicants and vendors to login to your site to manage their details, requirements and track any sales going through, we’ve got a bunch of shortcodes to facilitate this as follows:

[applicant_registration_form] – Output a form allowing applicants to register their details and requirements.

[propertyhive_my_account] – Output the user dashboard when logged in

[propertyhive_login_form] – A simple form allowing users to login and access their account area.

For a full list of shortcodes and the attributes they support please head over to our documentation.

Additional shortcodes

Note that the above shortcodes are all part of the core plugin. Pro features and other free add ons developed by ourselves may contain additional shortcodes too. For example, our Map Search feature has a [property_map_search] shortcode available, and our free Mortgage Calculator WordPress plugin can be embedded using the [mortgage_calculator] shortcode. Please check the documentation for the add on in question to see if any shortcodes are available.

Get started with Property Hive today
Get 7 days of full access to all features. Cancel anytime.
Try for free