Custom Blocks are a flexible content feature that can be used for a variety of purposes such as adding custom content that doesn't fit other feature options or adding widgets to your site.
How to create a custom block
- From the Dashboard, click the Custom Blocks tile
- Click Add custom block
-
Title, enter a title for the block
- Tip! This title is both administrative (making it easy to find for editing) and will be the default heading that can be displayed when the block is added to a landing page
- Lanugage, if applicable, select the appropriate Language
-
JavaScript code, add JS code here if you are adding a widget or other content via javascript for the block
- Important! Only use JS code from trusted sources (see the caution below)
- Body, enter the content you wish to display in the block, this could include text, images, videos, and more. See the WYSIWYG editor article for more information on formatting options and field functionality
- Review and adjust any settings in the Publishing workflow if needed
- Click Save when finished
-
Title, enter a title for the block
Caution! Poorly written JavaScript code can potentially expose your website and its users to security risks, compromise data, result in errors or broken functionality, all of which can lead to a poor user experience. Stacks is not responsible for troubleshooting or resolving issues that are a direct result of incorrect or poorly written JavaScript code.
We strongly recommended you thoroughly review and test any JavaScript code before implementing it on your website, or seek help from trusted sources if you are not familiar with JavaScript coding.
Once you have created one or more blocks, the next step is to add them to you homepage or any other landing pages on your site. See the article Adding a Custom Block to a Landing Page for more information on how to do this.