Skip to content
This repository has been archived by the owner on Jun 28, 2023. It is now read-only.

Adding a shortcode

Koen edited this page Jul 31, 2019 · 1 revision

Shortcodes can be used inside WYSIWYG content. See the WordPress codex on shortcodes for more information.

Adding a shortcode

Check the footnote shortcode example in the repository. This will allow a user to add the following shortcode:

[footnote id="3"]

This in turn will render the footnote.twig template inside the WYSIWYG content:

<a id="ref-3" class="footnote" href="#footnote-3" data-id="3" 
    data-handler="scrollTo" data-scroll-to-handle="footnote-3">3</a>