Shortcodes - [recent_properties]

About the shortcode

Output a list of recent/newly listed properties anywhere on the website using the shortcode:

[recent_properties]

By default this will output 12 on market properties ordered by the date they were last put on the market. Use the attributes below to further filter the properties output, for example:

[recent_properties property_type_id="5" availability_id="5"] 

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: [recent_properties carousel="1"]


Attribute: per_page

Description: Determines the number of properties displayed

Default: 12

Example: [recent_properties posts_per_page="12"]


Attribute: columns

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

Default: 4

Example: [recent_properties columns="3"]


Attribute: no_results_output

Description: Message to show if no properties are found.

Default: (empty)

Example: [recent_properties no_results_output="No properties to display"]


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: [recent_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: [recent_properties show_order="1"]


Attribute: pagination

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

Default: (empty)

Example: [recent_properties pagination="1"]

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:[recent_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: [recent_properties minimum_price="250000"]


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: [recent_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: [recent_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: [recent_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: [recent_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: [recent_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: [recent_properties negotiator_id="5"]

Attributes (ordering)

Attribute: orderby

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

Default: meta_value_num

Example: [recent_properties orderby="meta_value_num"]


Attribute: order

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

Default: desc

Example: [recent_properties order="asc"]