The classifieds shortcode should display a list of all classified listings as well as any filters used for searching for searching. The following shortcode can be added to a page of your choosing and looks as follows:
To tailor the shortcode to your needs, you could add the following parameters to the shortcode which should affect the display on the front end:
- per_page – Defaults to the ‘per page’ option in settings. This controls how many classified listings get listed per page.
- per_row – Defaults to the ‘per row’ option in settings. This controls how many listings are displayed per row.
- orderby – Defaults to ‘date’. Supports title, ID, name, date, modified, parent, rand.
- order – Defaults to ‘desc’. Can be set to ‘asc’ or ‘desc’ to choose the sorting direction.
- show_filters – Defaults to true. Shows filters above theclassified list letting the user narrow the list by keyword, location, and type. Once a filter is chosen, active filters are listed above theclassified listings, as is an ‘RSS’ link for the current search.
- show_pagination – Defaults to false. Enable this to show numbered pagination instead of the ‘load more listings’ link.
- show_categories – Defaults to true when categories are enabled. If enabled, the filters will also show a dropdown letting the user choose a classified listing category to filter by.
- categories – Comma separate slugs to limit the listings to certain categories. This option overrides ‘show_categories’ if both are set.
- classified_types – Comma separate slugs to limit the classified listing to certain types.
- location – Enter a location keyword to search by default.
- keywords – Enter a keyword to search by default.
- featured – Set to true to show only featured listings, false to show no featured listings, or leave out entirely to show both (featured first).
- classified_unavailable – Set to true to show only unavailable classified listings, false to show available listings, or leave out entirely to respect the default settings.