Shortcodes - [properties]

About the shortcode

Output a list of properties anywhere on the website using the shortcode:

[properties]

By default this will output 10 on market properties in price descending order. Use the attributes below to further filter the properties output, for example:

[properties property_type_id="5" bedrooms="2" availability_id="5"] 

This shortcode is for displaying a select few properties.

Do not use this shortcode for the search results page as you will not get functionality such as pagination and ordering.

You should be specifying your search results page under 'Property Hive > Settings > General'.

Attributes (display)

Attribute: carousel

Description: Displays properties as carousel slides with 'Next' and 'Prev' buttons to slide through it. Use the 'columns' attribute to specify how many properties show per slide.

Default: (empty)

Example: [properties carousel="1"]


Attribute: posts_per_page

Description: Determines the number of properties displayed

Default: Normally 10, unless the default has been changed in WordPress under 'Settings > Reading'.

Example: [properties posts_per_page="12"]


Attribute: columns

Description: Determines the number of columns the properties appear in.

Default: 2

Example: [properties columns="3"]


Attribute: show_result_count

Description: Shows the number of search results found, currently on page and total, e.g. "Showing 1–12 of 99 properties"

Default: (empty)

Example: [properties show_result_count="1"]


Attribute: show_order

Description: Whether to show a dropdown allowing users to sort by price and date.

Default: (empty)

Example: [properties show_order="1"]


Attribute: pagination

Description: Adds pagination so the user can go back and forth between pages.

Default: (empty)

Example: [properties pagination="1"]


Attribute: no_results_output

Description: Adds a message to the screen when there are no results to output.

Default: (empty)

Example: [properties no_results_output="Sorry. No properties found"]

Attributes (filtering properties)

Attribute: department

Description: Include properties only from a specific department. Departments can be managed under 'Property Hive > Settings > General'.

Possible Values: (empty), residential-sales, residential-lettings, commercial

Default: (empty)

Example: [properties department="residential-sales"]


Attribute: minimum_price

Description: Display properties with a price equal to or higher than the price passed through.

Default: (empty)

Example: [properties minimum_price="250000"]


Attribute: maximum_price

Description: Display properties with a price equal to or lower than the price passed through.

Default: (empty)

Example: [properties maximum_price="750000"]


Attribute: bedrooms

Description: Display properties with an exact number of bedrooms.

Default: (empty)

Example: [properties bedrooms="2"]


Attribute: minimum_bedrooms

Description: Display properties with a number of bedrooms equal to or higher than the value passed through.

Default: (empty)

Example: [properties minimum_bedrooms="2"]


Attribute: address_keyword

Description: Includes properties with a specific keyword found in one their address fields.

Default: (empty)

Example: [properties address_keyword="Lincoln"]


Attribute: keyword

Description: Includes properties with a specific keyword found in their address fields, features or descriptions.

Default: (empty)

Example: [properties keyword="Lincoln"] or [properties keyword="Pool"]


Attribute: radius

Description: Only applicable when Radial Search add-on is installed and an 'address_keyword' or 'keyword' attribute is also passed

Default: (empty)

Example: [properties address_keyword="Lincoln" radius="10"]


Attribute: availability_id

Description: Include properties based on their availability (For Sale, To Let, Under Offer etc).

The ID(s) can be found under 'Property Hive > Settings > Custom Fields'.

Supports multiple comma-delimited IDs.

Default: (empty)

Example: [properties availability_id="5,8"]


Attribute: property_type_id

Description: Include properties based on their property type (House, Bungalow etc).

The ID(s) can be found under 'Property Hive > Settings > Custom Fields'.

Supports multiple comma-delimited IDs.

If wanting to filter by commercial property types, ensure the primary department is 'Commercial' or you're passing through the 'department' attribute as 'commercial'.

Default: (empty)

Example: [properties property_type_id="1,4,6"]


Attribute: marketing_flag_id

Description: Include properties based on their marketing flags (Chain Free, New Build, Reduced etc).

The ID(s) can be found under 'Property Hive > Settings > Custom Fields'.

Supports multiple comma-delimited IDs.

Default: (empty)

Example: [properties marketing_flag_id="7,12"]


Attribute: location_id

Description: Include properties based on their location.

The ID(s) can be found under 'Property Hive > Settings > Custom Fields'.

Supports multiple comma-delimited IDs.

Default: (empty)

Example: [properties location_id="13,7"]


Attribute: office_id

Description: Include properties that belong to a specific office.

To find the office ID, go to 'Property Hive > Settings > Offices' and click 'Edit' next to the office in question. The ID will displayed at the end of the URL in your browser URL bar.

Supports multiple comma-delimited IDs.

Default: (empty)

Example: [properties office_id="5"]


Attribute: negotiator_id

Description: Include properties that belong to a specific negotiator.

To find the negotiator ID, go to 'Users > Settings > All Users' and click 'Edit' next to the negotiator/user in question. The ID will displayed in the URL section in your browser URL bar.

Supports multiple comma-delimited IDs.

Default: (empty)

Example: [properties negotiator_id="5"]


Attribute: ids

Description: A comma-delimited list of property post IDs should you wish to show specific properties.

Default: (empty)

Example: [properties ids="312,543,654"]


Attribute: commercial_for_sale

Description:

Possible Values: (empty), 1

Default: (empty)

Example: [properties commercial_for_sale="1"]


Attribute: commercial_to_rent

Description:

Possible Values: (empty), 1

Default: (empty)

Example: [properties commercial_to_rent="1"]

Attributes (ordering)

Attribute: meta_key

Description: If wanting to order by a post meta value, enter the key name here.

Possible Values: _price_actual, _bedrooms, _on_market, _featured

Default: _price_actual

Example: [properties meta_key="_bedrooms"]


Attribute: orderby

Description: The orderby argument passed through to WP_Query when querying the properties.

Default: meta_value_num

Example: [properties orderby="meta_value_num"]


Attribute: order

Description: The direction of order for properties based on the 'orderby' attribute

Default: desc

Example: [properties order="asc"]