Re-usable Sections – Shortcodes

← All Topics
Table of Contents

Since v.2.0 Chained has implemented 3 shortcodes which can help you create many beautiful blog or news sections.

Masonry

[masonry]

This is Masonry shortcode without any parameters, by default will display:

Masonry

4 Published Posts in 4 columns, ASC order from all categories in Masonry Layout

Parameters:

category – is used to select the category of posts you want to display and is used as: category=”number”

columns – is used to establish in how many columns you want the post to display and is used as: columns=”5″ (minim 2 and maxim 8)

posts_per_page – is used to select the number of posts you want to display and is used as: posts_per_page=”number”

order – is used to set the order in which you want the posts to display and is used as: order=”ASC” or order=”DESC”

ASC or DESC refers at the published date.

A complete shortcode that will display, let’s say 16 articles from Fashion Category in descending order (oldest first) in 6 columns will be:

[masonry category=”Fashion” order=”DESC” columns=”6″]

Mosaic

[mosaic]

This is Mosaic shortcode without any parameters, by default will display:

Mosaic

5 Published Posts, ASC order from all categories in Mosaic Layout.

Parameters

category – is used to select the category of posts you want to display and is used as: category=”number”

posts_per_page – is used to select the number of posts you want to display and is used as: posts_per_page=”number”

order – is used to set the order in which you want the posts to display and is used as: order=”ASC” or order=”DESC”

overlay – is used to add an background overlay with opacity for the text above image if the image is to light and the content cannot be well seen. Is used as: overlay=”yes” or overlay=”no”

style – is used to select the style for Mosaic Shortcode. There are 4 styles in total: Default, Default Reversed, Style 1 and Style 1 Reversed. Is used as: style=”style-1″ or style=”style-1-reversed” or style=”default-reversed”

Default Reversed
Style 1
Style 1 Reverse

ASC or DESC refers at the published date.

A complete shortcode that will display, let’s say articles from Fashion Category in ascending order (newest first) with overlay added will be:

[mosaic category=”Fashion” order=”ASC” overlay=”yes”]

Grid

[grid]

This is Grid shortcode without any parameters, by default will display:

Grid 3 columns
Grid 4 columns

4 Published Posts from all categories in, ASC order, in 4 columns, with 32px gutter between them, with title Horizontal News, and title color=”inherit”, in Grid Layout Design.

Parameters

category – is used to select the category of posts you want to display and is used as: category=”number”

posts_per_page – is used to select the number of posts you want to display and is used as: posts_per_page=”number”

columns – is used to establish in how many columns you want the post to display and is used as: columns=”5″ (minim 2 and maxim 8)

order – is used to set the order in which you want the posts to display and is used as: order=”ASC” or order=”DESC”

gutter – is used to set the distance between the posts and is used as: gutter=”nrpx”

show_title – is used to establish if you want or not to display the section title and is used as: show_title=”yes” or show_title=”no”

title – is used to overide the default (Horizontal News) and is used as: title=”My Custom Title”

color – is used to overide the default color for the title and the border and is used as: color=”#00000″ (any color)

hide_content – is used to hide the post excerpt and post meta when there are more than 4, 5 columns, the extra text doesn’t look very nice and would be ok to hide it as: hide_content=”yes”. By default it’s no.

A complete shortcode that will display, let’s say articles from Fashion Category in ascending order (newest first) in 5 columns with title “Fashion Posts” and title color red:

[grid category=”Fashion” order=”ASC” columns=”5″ title=”Fashion Posts” color=”red”]

Previous WooCommerce