[listing_advanced] Shortcode

This Listing Advanced feature allows for you to output a list of listings by any number of custom configurations on your pages and posts using a simple Shortcode.

There are a variety of options available with this Shortcode in Easy Property Listings.

[listing_advanced]

Usage

There are several options that may be specified using this syntax:

[listing_advanced option1="value1" option2="value2"]

You can also print a list of listings in a template like so:

<?php echo do_shortcode('[listing_advanced option1="value1" option2="value2"]'); ?>

All Options

post_type
status
commercial_listing_type
feature
feature_id
limit
offset
author
agent
featured
open_house
auction
class
wrap_template
template
location
location_id
tools_top
tools_bottom
sortby
orderby_clause
sort_order
query_object
pagination
post__in
post__not_in
instance_id

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". Default is any post type Options:

  • property
  • land
  • rental
  • rural
  • commercial
  • commercial_land
  • business
[listing_advanced 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_advanced post_type="property" status="sold"]
This also works:
[listing_advanced status="current,leased,sold"]

Note: withdrawn and offmarket status are prevented from display.

commercial_listing_type

specify the type of commercial listing it is, lease, sale or both. The default will output all commercial listings.

Options:

  • sale
  • lease
  • both
[listing_advanced commercial_listing_type="lease"]
feature

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

[listing_advanced feature="close-to-shops"]
feature_id

specify the feature ID when outputting listings. Options:

[listing_advanced feature_id="1"]
limit
specify the number of listings that are output. The default is 10. For Example, to display 30 listings:
[listing_advanced 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_advanced offset="1"]
author

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

[listing_advanced author="bob-smith"]
agent

specify the username of the agent to use when outputting listings. This will include both primary and secondary agents:

[listing_advanced agent="bob-smith"]
featured

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

  • 0
  • 1
  • on
  • off
[listing_advanced featured=1]
open_house

specify if listings to be displayed have an up and coming open for inspection date. Default false:

  • true
  • false
[listing_advanced open_house="true"]
auction

specify if listings to be displayed are auction listings. Default false:

  • true
  • false
[listing_advanced auction="true"]
class

specify a wrapper class for the shortcode.

[listing_advanced class="my-custom-class"]
wrap_template

specify a wrapper template class for the shortcode. Used to render wrapper of listings render using shortcode. Default file is shortcode-listing.php. This can be overridden by placing a copy of shortcode-listing.php from plugins/easy-property-listings/lib/templates/content to your active_theme/easypropertylistings folder and and rename the file to shortcode-listing-{wrap_template}.php

[listing_advanced wrap_template="my-custom-class"]
template

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

  • slim
  • table
  • table_open
[listing_advanced 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_advanced location="sorrento"]
location_id

specify the location ID when outputting listings:

[listing_advanced location_id=1]

If you are filtering by the Suburb field which can be renamed to City or whatever, the way to actually use that value is by the category key called: property_address_suburb This also requires you to type in exactly as it appears in the box.

Edit_Listing_‹_Happy_Jack_Arizona_Real_Estate_—_WordPress

tools_top

specify outputting the grid and sort options. Default is off.

[listing_advanced tools_top="on"]
tools_bottom

for future use.

[listing_advanced tools_bottom="off"]
sortby

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

  • price
  • date
  • status
  • rand (Random sorting)
[listing_advanced sortby="price"]
sort_order

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

  • ASC
  • DESC
[listing_advanced sort_order="ASC"]
orderby_clause

order by two different pieces of postmeta (for example, suburb first and state second).

[listing_advanced _property_bedrooms="2" _property_featured="yes" orderby_clause="property_bedrooms_clause|ASC,property_featured_clause|DESC"]

pagination

specify outputting the pagination options. Default is on.

[listing_advanced pagination="off"]
posts__in

specify the WordPress post_id of the listings you want to display, multiple listings can be output. Default is blank.

[listing_advanced posts__in="2,233,45"]
posts__not_in

specify the WordPress post_id of the listings you do not want to display, multiple listings can be output. Default is blank.

[listing_advanced posts__not_in="6,12,14"]
instance_id

specify the shortcode instance when using multiple shortcodes on a page, set the instance to implement separate paging. Default is 1.

[listing_advanced instance_id="2"]

Advanced Filtering Of Custom Fields

Query Any Meta Key just using shortcodes

[listing_advanced _property_bedrooms="2"]

Query Any Meta Key just using shortcodes - multiple meta query

[listing_advanced _property_bedrooms="2" _property_featured="yes"]

Using ' Not Equal' in shortcode

[listing_advanced _property_address_suburb_not_equal="sorrento"]

Using ' BETWEEN' in shortcode

[listing_advanced _property_bedrooms_in="2,4"]

Using ' IN' in shortcode

[listing_advanced _property_bedrooms_in="2,4,6"]

Using ' EXISTS' in shortcode

[listing_advanced _property_showcase_exists=""]

Order By multiple meta query

[listing_advanced _property_bedrooms="2" _property_featured="yes" orderby_clause="property_bedrooms_clause|ASC,property_featured_clause|DESC"]