[listing] Shortcode

The Listing feature allows you to output your listings on your pages and posts using a simple Shortcode. There are a variety of options available with each Shortcode in Easy Property Listings.

[listing]
You can output listings by a specific type like this:
[listing post_type="property"]

Usage

There are several options that may be specified using this syntax:
[listing option1="value1" option2="value2"]

You can also print a list of listings in a template like so: <?php echo do_shortcode('[listing post_type="property" limit="50" template="table"]'); ?>

Option Order

Note: The order of the options is important so order your options correctly to get the best result.
post_type
status
limit
offset
author
featured
template
location
tools_top
tools_bottom
sortby
sort_order
pagination

Options

The following options are accepted:

post_type

specify which property type to display. The default is any activated listing type you have enabled. The option allows you to output multiple listing types by comma separating them "property,land" Options:

  • property
  • land
  • rental
  • rural
  • commercial
  • commercial_land
  • business
[listing post_type="property,land"]
status

specify the listing status to output. The default will output all of the following status's. Options:

  • current
  • sold
  • leased
[listing post_type="property" status="sold"]

Note: withdrawn and offmarket status are prevented from display.

limit
specify the number of listings that are output. The default is 10. For Example, to display 30 listings:
[listing limit="30"]
offset
specify the number of listings to skip that are output. The default is 0. For Example, you can now use multiple shortcodes on a single page and offset them so each will display a unique listing:
[listing offset="1"]
author

specify the username of the author to use when outputting listings:

[listing author="bob-smith"]
featured

specify the listing if it is featured when outputting listings. Options:

  • 0
  • 1
[listing featured=1]
template

specify the template to use when outputting listings. The default is the blog view. Options:

  • slim
  • table
[listing template="table"]
location
specify the location of the listing so you can create a Sydney page and only output listings in that city. The option used is the location slug which works similar to post categories.
[listing location="sydney"]
tools_top
specify outputting the grid and sort options. Default is off.
[listing tools_top="on"]
tools_bottom

for future use

[listing tools_bottom="off"]
sortby

specify outputting the order of the listings. Default is sorted by date newest first. Default is date. Options:

  • price
  • date
[listing sortby="price"]
sort_order

specify the order either ASC or DESC. Default DESC. Options:

  • ASC
  • DESC
[listing sort_order="ASC"]
pagination

specify outputting the pagination options. Default is on.

[listing pagination="off"]

Shortcode Options

'post_type'		=> "property" // "property,rental,land,commercial,commercial_land,business"
'status' 		=> "current // "current" or "sold" or "leased"
'limit' 		=> "10", // Number of maximum posts to show
'offset' 		=> "0", // Offset Posts
'author'		=> "",	// Author of listings.
'featured'		=> 0,
'template' 		=> "", // Options "slim" or "table"
'location' 		=> "", // Should be your location taxonomy name like "sydney", or "mount-barker"
'tools_top' 		=> "off", // Tools before the loop like Sorter and Grid on or off
'tools_bottom' 		=> "off", // For future enhancements
'sortby' 		=> "", // Options: price, date : Default date
'sort_order' 		=> "DESC" or "ASC"
'pagination' 		=> "on", // Pagination on or off

The order of the options is important with WordPress shortcodes.