Where to add code
Add site-wide code
- Open your website in the editor.
- Click Settings, then choose Custom Code.
- Paste your code into the header or body section.
- Save, then publish your site.
</head>. Use it for analytics and verification tags:
Header example
</body>. Use it for chat widgets and other scripts that don’t need to load first.
Create custom blocks with ChatGPT, Claude or another AI
You can use your own ChatGPT, Claude or other AI account to generate a section of code, then add it to your page as a block. This is useful when you want a fresh creative direction, or when you’ve used up your Webfast AI credits.1
Describe the block
In your AI tool, describe the block, what it’s for and the content it should include. Share your website’s fonts, colors and an example of its style.
Example prompt
2
Add a custom code block
In the Webfast editor, open the block picker and choose the custom code block option. Paste the code in.
3
Preview it
Check the block on desktop, tablet and mobile.
4
Test and publish
Click every link, button and interactive element, then publish.
Refine external code with Webfast AI
You can also paste code from ChatGPT, Claude or another tool into the Webfast AI chat. Explain where it should go and how it should fit your site, and Webfast AI integrates and refines it for you. This uses Webfast AI credits.Edit an element’s code
To change the HTML of something already on your page, click Select, click the element, and open the Code tab in the Properties panel.Best practices
- Scope your CSS so it only affects your block.
- Load third-party scripts with
asyncordefer. - Check your code for errors before you paste it.
- Keep a note of what each snippet does.
Troubleshooting
- Code isn’t showing: make sure you saved and published, then clear your browser cache.
- Something looks broken: open your browser’s developer console to look for errors, and remove the most recent snippet to see if that fixes it.
- Page loads slowly: load scripts asynchronously and remove snippets you no longer use.

