[rep_suburbs]
You can use our Suburbs Shortcode to display suburbs from your Malcolm account directly on any page or post.
Product
Shortcode Attributes
There are a number of shortcode attributes available which you can use to customize the output.
GENERAL LAYOUT
- display – Defines the display between Grid, and Carousel view.
- Default: The default value is based on the selected value under Malcolm > Settings > General > General > Display.
- Options:
grid,carousel.
- layout – Controls the layout of each suburb on the result.
- Default: The default value is based on the selected value under Malcolm > Settings > General > General > Layout.
- Options: From
1to5. Specify one only.1– Image above content2– Image left content3– Image right content4– Image overlay content5– Content only
- columns – Defines how many suburbs are displayed per row. Use in conjunction with layout
1,4, and5. This attribute is ignored on layout2and3.- Default: The default value is based on the selected value under Malcolm > Settings > General > General > Columns.
- Options: From
1to5. Specify one only.
- max_chars – Maximum number of characters to display in the suburb description.
- Default: The default value is based on the selected value under Malcolm > Settings > General > General > Max Characters.
- Options: Integer values. Recommended value is around 150.
- max_posts – The maximum number of suburbs to display.
- Default: The default value is based on the selected value under Malcolm > Settings > General > General > Max Posts.
- Options: Integer values.
GRID LAYOUT
- posts_per_page – Toggles pagination on. Use in conjunction with max_posts.
- Default: The default value is based on the selected value under Malcolm > Settings > General > General > Posts Per Page.
- Options: Integer values.
CAROUSEL LAYOUT
- autoplay – Enable or disable carousel autoplay.
- Default: The default value is based on the selected value under Malcolm > Settings > General > General > Autoplay.
- Options:
onoroff.
- infinite_carousel – Enable or disable infinite carousel, allowing the carousel to slide endlessly
- Default: The default value is based on the selected value under Malcolm > Settings > General > General > Infinite Carousel.
- Options:
onoroff.
SECTION
- header_title – Displays header title text above the feed.
- header_sub_title – Displays header sub title text above the feed.
- section_background_image – Adds a background image to section. Use image URL as value.
- section_background_color – Adds a background color to the section. Use valid CSS color value.
- section_font_color – Defines the font color used on the section. Use valid CSS color value.
- section_width – Defines the width of the section.
- Default:
default(which is a max width of 1140px). - Options:
default,small,medium,largeorfull. Specify one only.
- Default:
- view_more_link_text – Text to display on the section view more button. This is not applicable when
archiveison- Default:
"View more".
- Default:
- view_more_link – URL to view more suburbs.
- classes – Adds an HTML class to the section wrapper so you can modify the specific output with custom CSS.
FILTER
- categories – Set the post category.
- exclude_categories – An array of excluded categories.
- orderby – Specifies the order in which suburbs are displayed.
- Default: The default value is based on the selected value under Malcolm > Settings > Suburbs > General > Order By.
- Options:
date,title,menu_order,rand. Specify one only.
- order – Determines whether the suburbs are listed in ascending or descending order.
- Default: The default value is based on the selected value under Malcolm > Settings > Settings > General > Order.
- Options:
asc,desc. Specify one only.
- featured – Filters suburbs based on their “featured” status.
- Default: off.
- Options:
onoroff.
Example Usage
[rep_suburbs orderby="date" order="ASC" categories="suburb-category" posts_per_page="10"]
This example will display a list of suburbs ordered by date in ascending order, filtered by the category suburb-category, and show 10 posts per page. |
featured attribute.Pagination: Pagination is added automatically on
grid display if there are more results than can be displayed at once. Multi-Column or Archive Layout: The shortcode supports multi-column or archive layouts, if
archive is set to on. The layout depends on the selected value on Malcolm > Settings > Suburbs > Archive Page > Archive Page Layout.