Shortcodes in Website Builder

Learn what WEMASY shortcodes are, which shortcodes exist, where you can use them and how to write one, such as a button or an accordion inside text.

Shortcodes are short text tags in square brackets, such as [wemasy-button], that WEMASY turns into a real element on your published site. They let you place a button, an image or an accordion inside a text or a custom template without dragging an element. Most elements in the Website Builder have a shortcode.

How a shortcode looks

Website Builder: Available shortcodes

A shortcode has a name and settings, called attributes. Some have content and a closing tag:

  • A button: [wemasy-button text="Get started" url="/contact" variant="primary"]
  • An image: [wemasy-image src="/welcome-banner.jpg" align="center" /]
  • An accordion with content: [wemasy-accordion title="Do you deliver?" open="false"] your answer [/wemasy-accordion]

Where you can use shortcodes

  • Text: in a Paragraph element and other rich text fields. These shortcodes render when your site is published, not on the canvas.
  • Custom templates: in the HTML of a custom code section. There they also show on the canvas and stay editable. See Custom templates and code.

Available shortcodes

Each shortcode starts with wemasy-:

  • Text and layout: wemasy-paragraph, wemasy-columns with wemasy-column, wemasy-scroll, wemasy-accordion, wemasy-conditional with wemasy-condition.
  • Media: wemasy-image, wemasy-logo, wemasy-gallery, wemasy-video, wemasy-slider with wemasy-slide, wemasy-carousel, wemasy-threedmodel, wemasy-embed, wemasy-map.
  • Actions and content: wemasy-button, wemasy-social-links, wemasy-review, wemasy-forms, wemasy-contactform, wemasy-popup, wemasy-menu, wemasy-structures, wemasy-savedcontent.
  • Webshop and bookings: wemasy-products, wemasy-productcategories, wemasy-addtocart, wemasy-search, wemasy-cart, wemasy-customeraccount, wemasy-booking, wemasy-membershipplans, wemasy-timetable, wemasy-courses.

Add a shortcode to a text

  1. Click the text on the canvas to edit it.
  2. Type the shortcode on its own line, for example [wemasy-button text="Book now" url="/booking"].
  3. Publish your website.
  4. Open the live page to check the result.

Write shortcodes correctly

  • Use straight double quotes around attribute values.
  • Close shortcodes that have content, such as [/wemasy-accordion].
  • Copy the name exactly: wemasy-structures is the shortcode of the Structures element.

Accordions from shortcodes use your accordion styles. See Accordion styles in customization.

Tip: for normal pages, dragging elements is easier and you see the result right away. Use shortcodes where an element cannot go, such as inside a long text.

Put it to work
on your own website.

Start free with WEMASY and build your site in a few minutes.