WP-Property Shortcode Cheat Sheet

This page is a summary of the shortcodes available in WP-Property. Shortcodes are a WordPress technique which makes it easy to insert advanced content into your website. A shortcode placed in the back-end will display related content on the front-end. For example, with WP-Property installed, simply placing this Property Search shortcode [property_search] into your page will draw a Property Search Form on the front-end of the website! It's that easy! WP-Property Premium Feature shortcodes can be found on the WP-Property Premium Features Shortcode Cheatsheet. Developers can learn more about WordPress shortcodes here.

About Attributes

Attributes describe specific characteristics of your properties, such as price or address. Attributes can be accessed and manipulated with shortcode. On the WP-Property Developer tab, you are able to edit default property attributes, plus create any custom attribute you would like.

Property Overview Shortcode

Property Overview shortcode is used to display a list of properties.  In it's most basic form, it will return all the published properties on your site:


More advanced things can be set by combining multiple attributes together.  For instance, to list all properties with either one or three bathrooms and with anywhere from two to four bedrooms:

[property_overview bathrooms=1,3 bedrooms=2-4]

You can also specify certain settings in the shortcode, such as the number of results you want to display per page:

[property_overview bathrooms=1,3 bedrooms=2-4 per_page=10]



By default "Menu Order" is used to sort properties.  However, you can also sort by using almost any other attribute.  The first step is to turn the sorter on, like so:

[property_overview sorter=on]

To set the order, use the sort_by option, the two possible options are ASC and DESC, which stand for ascending and descending, respectively.  In the following example we sort by price, with the highest price on top.

[property_overview sorter=on sort_by=price sort_order=DESC]

Address Attributes

Address-related attributes deserve a special mention. When you save or update a property, Google validates the address, and loads the country, country_code, state, state_code, city, county, route, street_number, postal_code into their own attributes. These attributes can be used to filter or "query" your properties. For example, the following shortcode will load all properties in the state of New York, if you add that attribute to Property Attributes tab on Properties/Settings/Developer page.

[property_overview state_code=NY]

Dynamic Attributes

Certain values will be dynamically replaced by WP-Property. Specifically, 'post_id', ‘post_parent’ and ‘property_type’ are replaceable.

A practical example would be if you want to list all the listings that are a child of the current property:

[property_overview post_parent=post_id]

Or, if you want to list all listings that are children of the same parent (i.e. siblings) of the current property:

[property_overview post_parent=post_parent]

In other words, the Dynamic Attributes will automatically adjust your query based on the currently viewed property.

Custom Templates

You can use the template option to load a particular layout template for results.  Typically you, or your developer, would create a custom template using PHP, a grid layout for instance, and save it into your theme directory.  So if your custom template is called property-overview-andys-awesome-template.php you would use it like so:

[property_overview template=andys-awesome-template]

Alternatively, the property gallery can also be called as a template from [property_overview] shortcode. Example:

[property_overview template=property_gallery featured=true]

show_childrenbooleanProperty Settings configurationSwitches children property displaying.
child_properties_title stringFloor plans at locationRenames child properties tittle.
fancybox_previewbooleanProperty Settings configurationSwitches fancybox preview.
bottom_pagination_flagbooleanProperty Settings configurationSwitches bottom pagination flag.
thumbnail_sizestringSettings configurationSets thumbnail size.
sort_by_text string“Sort By:”Renames “Sort By:” text.
sort_byattribute stringmenu_orderSets sorting by attribute.
sort_orderASC/DESCASCSets sort order.
templatestringPHP template nameSets layout using template.
buttonsSets sorter type.
paginationon/offonSwitches on pagination.
per_pagenumber10Property quantity per page.
starting_rownumber0Sets starting row.
detail_buttonstringnoneNames detail button.
hide_countbooleanfalseWill hide the “10 found.” text.
in_new_window booleanfalseWill open result in new window.
strict_searchbooleanfalseProvides strict search
property_id or IDnumbernoneWill show particular property, which id is set

If you use ‘property_gallery’ as a template, you can pass new options to into the shortcode to configure the template. See Property Gallery shortcode for a full list of options.

In addition to sorting and querying by the attributes you have defined in the Developer tab, you can sort by a few attributes that are built into WordPress, such as: menu_order, post_title and post_date.

Property Search Shortcode

CSVIf this attribute is not set, shortcode returns only first 5 searchable attributes.Comma separated list of attributes to display for search. Attributes will be rendered with the input types specified in the Developer tab.
Exception: ‘city’ is specific predefined property attribute. It’s created by WPP and always searchable. But it can be created manually as other custom property attributes to operate attribute’s settings (‘Admin only’,’Searchable’, etc).
CSVProperty types that set on Properties/ Setings/ Developer tab as searchable. Comma separated list of searchable property types for this search.
paginationon/offonWheather to use pagination on search result page.
group_attributeson/offoffIf attributes should be displayed in groups, as configured in Developer tab.
per_pagenumber10Number of search results per page when rendering search.

Single Property Map Shortcodes

This shortcode displays property maps from single property pages.


width CSS Dimensions100%With CSS dimensions the size can be passed using either a percentage, or pixels.
height CSS Dimensions450pxSets map height.
zoom_levelnumber13The zoom level of the map.
hide_infoboxtrue/falsefalseHides map infobox
property_idnumberDefault is false, meaning the shortcode will detect the currently displayed property.Detects the current one if nothing is passed.

Property Attribute Shortcodes

Property Attribute Shortcodes return the value of an attribute for a specific property. The current property is targeted by default. Properties other than the current one can be specified using their property ID number, as shown below.

Example: to get the number of bedrooms for current property:

[property_attribute attribute=bedrooms]

Example: to get the number of bathrooms for a property with an ID of 5:

[property_attribute property_id=5 attribute=bathrooms]

Example: shows status for current property:

[property_attribute attribute=status]

Example: shows map for current property:

[property_attribute attribute=map]

property_id integerID of current propertySets property ID for displaying.
attribute stringNoCalling “attribute=map” is same as using the [property_map] shortcode.
before stringblankText to display before the attribute is displayed, if the attribute has a value.
after stringblankText to display after the attribute value is displayed.
if_empty stringblankText to display if attribute is empty.
strip_tags true/falsefalseCan strip out any HTML tags from the attribute value, if it has any.
do_not_format true/falsefalseOnly works when property_id is passed, and will not run the property through the prepare_property_for_display() function, which adds currency, area, etc. filters.

Featured Property Shortcodes

property_type stringmost common property typeSets effected property type.
class stringshortcode_
Sets class.
per_page integer6Property quantity per page.
sorter_type buttons
noneSets sorter type.
show_children true/falsefalseSwitches children property displaying.
hide_count true/falsefalseWill hide the “10 found.” text.
bottom_pagination_flag true/falsefalseSwitches bottom pagination flag.
pagination on/offoffSwitches on pagination.
stats CSV string of attributesSet by theme optionsSets stats displaying.
thumbnail_sizestringthumbnailSets thumbnail size.

List Attachments Shortcode

Used to display attachments of a property, can also be used in a post. Ported over from List Attachments Shortcode plugin.  If plugin exists, the WP-Property version of shortcode is not loaded.


type a comma-separated list of file extensions that should be included in the listall attachments will be included order byAny of the values that can be used with the WordPress query_posts() function.
order ASC/DESCASCIndicate whether the list should be sorted in ascending or descending order.
groupby a comma-separated listnoneIf you would like the list split into specific groups, you can indicate any of the WordPress post object parameters as the value of this property. For instance, you can use a common "description" for your attachments to organize them into groups. In that case, you would use "post_content" as the "groupby" parameter for this shortcode.
before_list HTML codenoneAny HTML code you want to appear before the list begins opening - the opening tag(s) for the list (defaults to <ul class="attachment-list">).
closing HTML codeto </ul>The closing tag(s) for the list.
before_item HTML codeto <li>The opening tag(s) for each item of the list.
after_item HTML codeto </li>The closing tag(s) for each item of the list.