1. Home
  2. Docs
  3. Developer Guide
  4. Shortcodes
  5. [recent_properties]

[recent_properties]

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

[recent_properties]

By default this will output 12 recently added properties in date order and uses the content-property-recent.php template.

Note: This shortcode is for displaying a select few properties that have their "On Market" tickbox enabled recently.
The "On Market" tickbox can be found by editing any property and going to its Marketing tab)
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'.

You can modify this shortcode by adding one or more attributes to expand it (per your requirements):

Example: The following shortcode attributes are added together to achieve the Result below.

[recent_properties department="residential-sales" availability_id="5" columns="3" orderby="date"]

Result: Shortcode will include only recently added properties from the "Residential Department", with status "For Sale", "in 3 columns" and "order them by date added".

TYPE: Visual and functional

Attributes that affect how the [recent_properties] shortcode shows recent properties and adds extra display options.

 

Attribute: carousel

Description: Displays recently added properties as carousel slides; Previous and Next buttons added to scroll through.

Default: 4 (recently added properties displayed at any given time)

Example: [recent_properties carousel="1"] to enable and show.

 

Attribute: per_page

Description: Determines the number of recently added properties displayed at once, per page.

Default: 12

Example: [recent_properties per_page="12"]

 

Attribute: columns

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

Default: 4

Example: [recent_properties columns="2"]

 

Attribute: show_result_count

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

Default: (empty)

Example: [recent_properties show_result_count="1"] to enable and show.

 

Attribute: show_order

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

Default: (empty)

Example: [recent_properties show_order="1"] to enable and show.

 

Attribute: pagination

Description: Adds the number of pages based on search results, so the user can go back and forth between them.

Default: (empty)

Example: [recent_properties pagination="1"] to enable and show.


 

TYPE: Display Filters

Attributes that act as 'filters' and control which recently added properties are displayed.

by Department

Attribute: department

Description: Include recently added properties only from a specific active department.
Your Active Departments are found in Property Hive > Settings > General Options

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

Default: (empty)

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


by Price

Attribute: minimum_price

Description: Display properties with their minimum sale price of "exact number" and higher than.

Default: (empty)

Example: [properties minimum_price="250000"]

 

by Custom Field IDs

IMPORTANT
To find the correct "IDs" used in attributes such as "availability_id", "marketing_flag_id", etc:
Please, go to Property Hive > Settings > Custom Fields. Please use the IDs, not the actual words.

Attribute: availability_id

Description: Include recently added properties based on their "Availability status" (For Sale, To Let, Under Offer, etc)

Default: (empty)

Example: [recent_properties availability_id="3"]

 

Attribute: office_id

Description: Include recently added properties that belong to a specific office.
To find the office ID, go to Property Hive > Settings > Offices > Find the office which ID you need and click "Edit",
the ID will displayed at the end of the URL in your browser's search bar.

Default: (empty)

Example: [recent_properties office_id="13"]

 

Attribute: negotiator_id

Description: Include recently added properties that belong to a specific negotiator.
To find the negotiator ID, go to Users > Settings > All Users> Find the users which ID you need and click "Edit",
the ID ("user_id=X") will displayed in the URL section in your browser's search bar.

Default: (empty)

Example: [recent_properties negotiator_id="2"]


Attribute: orderby

Description:

Default: date

Example: [properties orderby="date"]


Attribute: order

Description:

Default: desc

Example: [properties order="asc"]


Was this article helpful to you? No Yes

How can we help?