Shortcodes
GENERAL
EXTENSIONS
THEMES
There are a number of shortcodes that can be used to display vehicle listings, contact form or search box.
These work the same as any other WordPress shortcode and each shortcode can be configured by using the relevant shortcode attribute(s) as detailed below.
Show a single Listing
This shortcode can be used to display a single listing. The shortcode could be embedded within a page to highlight a particular listing.
[auto_listings_listing id='100]
Attributes
The id attribute is required.
- id – The ID of the listing you want to display.
Show multiple Listings
This shortcode could be used to display featured listings on your homepage, or using it with the ‘compact’ attribute set to true, it can show compact listings in your sidebar.
[auto_listings_listings orderby='date' order='asc' number='20' seller='100' ids='24,25,26,28,35' compact='true']
Attributes
All attributes are optional.
- orderby – can be any valid WP Query orderby string
- order – asc or desc
- number – the number of listings to display
- seller – only show listings by this seller ID
- ids – only show these listings. A comma separated list of listing ID’s
- columns – number of columns
- view – grid or list
- no_results – text to display when there is no listings
- compact – true or false. Compact mode is useful for adding a compact list of listings to sidebars.
Show the Advanced Search box
Place the below shortcode wherever you would like a search box. This will display the default search box.
[auto_listings_search]
To customize the display of the search box, you need to add attributes to the shortcode.
Available Attributes
- area_placeholder – text to display as the placeholder text in the text input. Default is “State, Zip, Town”
- submit_btn – text to display on the search button. Default is “Find My Car”
- refine_text – text to display on the refinements link. Default is “More Refinements”
- style – 1, 2, 3 or 4
- layout – either leave blank or “standard”
- exclude – a comma separated list of fields that you don’t want to display. The fields are year, make, model, condition, prices, min_price, max_price, area, refine, body_type, odometer
View a live example of the search shortcode.
Show the Contact Form on a single Listing
This shortcode is automatically embedded within the sidebar template of the single listings, which will make the contact form appear on each listing (but there is an option to turn it on or off on each individual listing if you like).
There are no options to modify this shortcode. All options for the contact form are set in Settings.
[auto_listings_contact_form]
Visit any listing to view a live example of the contact form.