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

[featured_properties]

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

[featured_properties]

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

Note: This shortcode is for displaying a select few properties that have their "Featured" tickbox enabled.
The "Featured" 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.

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

Result: Shortcode will include only featured 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 [featured_properties] shortcode shows featured properties and adds extra display options.

 

Attribute: carousel

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

Default: 4 (featured properties displayed at any given time)

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

 

Attribute: per_page

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

Default: 12

Example: [featured_properties per_page="12"]

 

Attribute: columns

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

Default: 4

Example: [featured_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: [featured_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: [featured_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: [featured_properties pagination="1"] to enable and show.


 

TYPE: Display Filters

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

by Department

Attribute: department

Description: Include featured 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: [featured_properties department="residential-sales"]


by Address

Attribute: address_keyword

Description: Include featured properties with a specific keyword found in their address fields.

Default: (empty)

Example: [featured_properties address_keyword="Lincoln"]


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 featured properties based on their "Availability status" (For Sale, To Let, Under Offer, etc)

Default: (empty)

Example: [featured_properties availability_id="3"]

 

Attribute: office_id

Description: Include featured 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: [featured_properties office_id="13"]

 

Attribute: negotiator_id

Description: Include 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: [featured_properties negotiator_id="2"]


by Meta Key and values

Attribute: meta_key

Description: _price_actual, _bedrooms

Default: _price_actual

Example: [properties meta_key="_bedrooms"]


Attribute: orderby

Description:

Default: meta_value_num

Example: [properties orderby="meta_value_num"]


Attribute: order

Description:

Default: desc

Example: [properties order="asc"]


Was this article helpful to you? No Yes

How can we help?