Canvasly shortcodes

A shortcode is a short tag you paste into WordPress content. Canvasly registers three. The Shortcode unit inside the editor is different: it runs any shortcode you type into that unit.

Updated . Covers Canvasly 0.12.76 and Canvasly Pro 0.6.3.

Saved template

Prints a published saved Canvasly template, including its styles and scripts. If a template embeds itself, that loop is stopped and nothing extra is printed. You can use the template’s number or its title. The number wins when both are present.

AttributeDefaultWhat you put here
id0The saved template’s number. 0, or a missing template, prints nothing.
titleEmptyUsed only when id is empty. Canvasly looks up a template with this title.

Example with the template number:

[canvasly_lite_template id="42"]

Example with the template title:

[canvasly_lite_template title="Homepage hero"]

Menu anchor

Wraps the text inside the shortcode in a section that the page can scroll to. A Menu Anchor unit on the canvas can point at the same kind of id. The plugin can also add matching links into a WordPress menu.

AttributeDefaultWhat you put here
idEmptyThe anchor name, such as contact-us. Links use #contact-us.
classEmptyExtra class name on the section.

The words between the opening and closing tags are the section content. Shortcodes inside that content are processed.

[canvasly_anchor id="contact-us" class="visit"]Write or call us.[/canvasly_anchor]

Site menu

Prints a WordPress menu. On a narrow screen it becomes a hamburger button. The same choices exist on the Site Menu unit.

AttributeDefaultWhat you put here
menuEmptyA classic menu from Appearance → Menus, or a theme location slug such as primary.
layouthorizontalhorizontal or vertical.
breakpoint782Width in pixels. Below this width the menu collapses. The unit allows 320 to 1400.
labelEmptyThe accessible name of the menu. The placeholder in the unit is Primary.
[canvasly_nav menu="primary" layout="horizontal" breakpoint="782" label="Primary"]

Sidebar widget

Under Appearance → Widgets, the Canvasly Template widget shows a saved template in a widget area. It is not a shortcode. Its fields are Title (optional) and Saved Template. If no template is chosen, the widget prints nothing.