WPRL Shortcodes

Shortcodes are tags you use in a post or page to include functionality from a plugin. The idea has been around for a while, however with the release of WP 2.5 they have become a standard functionality in Wordpress.

Example Shortcode:
[wprl_search features="pool" min_price="300000"]
This tag would show all listings that have a pool that are a minimum price of $300k.

Available WPRL shortcode arguments. format: arg=”value”

  • hotlist
    Example: hotlist=”mylistings”. Available hotlists:

    • mylistings
      this will print listings where the listing agent matches your name. Your name is setup via the WPRL Settings screen.
    • ourlisting
      This will currently print agency listings. Agency is setup on the settings screen
    • featured
      Any features that you have tagged as featured will be displayed.
    • newlistings
      WPRL keeps track of when listings are inserted into the dbase. This will display listings that are less than 5 days old.
    • newlypriced
      WPRL keeps track of when old listings have a price change. This will display listings that have been recently changed in the last 5 days.
  • listing_type - set to RESI for residential or LAND for land.
  • property_type - set to property type based off MLS data
  • subdivision - set to a subdivision to narrow listings to an subdivision
  • min_price - get listings with price >= amount. amount should have no commas or dollar signs.
  • max_price - get listings with price <= amount. amount should have no commas or dollar signs.
  • features
    There are lots of extra fields in most IDX listings. Ranging from pool, hot tub to water front. Every MLS is different and each MLS has included different data in their IDX feeds. Any value you set this too will match any of these extra fields. So features=”river” would match any listing that had the word river in its fields. This field can take more than one value separated by the pipe (|) character.
  • tag
    In wp-admin you can view and edit listings. One feature is the ability to tag a listing with any tag that you wish. Think of tagging as any keyword you want to identify to a listing. You can set a tag to absolutely anything you want.
    Examples: Family home, Green Home, Featured, Great Location

    By using this argument in the shortcode, you can pull listings you have assigned to these tags. This field can take more than one value separated by the pipe (|) character.

    Examples:

    • tag=”green home”
    • tag=”featured”
    • tag=”family home|great location” This would match listings with tags of family home OR great location.
  • area
    If your IDX feed breaks your city into areas, you can use this argument to narrow the search to a given area.

    Examples:

    • area=”downtown”
    • area=”north side|northeast side” This would show listings in the north side AND the northeast side.
  • city
    Examples:

    • city=”Dallas”
    • city=”Dallas|Fort Worth” This would show listings in Dallas AND Forth Worth
  • sqft
    example: sqft=”1000″ This would match all listings with AT LEAST 1000 square feet.
  • bedrooms
    example: bedrooms=”3″ This would match all listings with AT LEAST 3 bedrooms
  • bathroom
    example: bathrooms=”2″ This would match all listings with AT LEAST 2 bathrooms
  • acres
    example: acres=”1″ This would match all listings with AT LEAST 1 acre.
  • county
    This argument is similar to city. Look at city argument for details
  • state
    This argument is similar to city. Look at city argument for details
  • mls_number
    This argument will take a list of 1 or more MLS numbers. It will show all listings that match given numbers.

    example: mls_number=”12345″ or mls_number=”12345|6789″

  • agent_name
    Using this will match the agent name given to the listing agent. This argument is really useful for creating agent pages on your site if your site is for many agents. You can include more than one agent separated by a pipe (|) character.

    Examples:

    • agent_name=”paul smith” - show all of paul smith’s listings
    • agent_name=”paul smith|suzy prince” - show all of paul smith’s and suzy prince’s listings.
  • sortby
    Warning: This is an advanced argument. Use this only if you understand this.
    This argument lets you change the sorting of results. Valid options are price, bedrooms, bathrooms, city, acres, sqft_total. Default is price.
    You can also tell which direction to sort in. Ascending (ASC) or descending (DESC) order. Search order is optional. You can also get a little complex with this argument in that you can sort by multiple fields. When using multiple fields, the first field takes precedence. It will only order the subsequent fields when the first field values are the same.

    Examples:

    • sortby=”bedrooms DESC” - displays results from most bedrooms to least bedrooms.
    • sortby=”city” - displays listings ordered by city alphabetically A-Z.
    • sortby=”city, price” - displays listings ordered by city first then by price. A-Z and least expensive to most.
    • sortby=”price, bedrooms DESC, bathrooms” - This is pretty complex and admittedly a weird query. But it is possible. This would sort by price, then bedrooms, then bathrooms. Bedrooms however would be sorted from most bedrooms to least bedrooms. Remember, it would only sort by bedrooms if more than one listing has the same price. And further, it would only sort by bathrooms if the listings have the same price AND same number of bedrooms. This is about as complex as you can get in sorting and should give you a good idea of how to use this field.