Skip to content

Custom code

Swebsy lets you inject arbitrary code into the <head> or <body> of every page, and add global CSS and JavaScript.

Go to Settings → Advanced to access four code fields:

FieldWhere it’s injected
Custom <head> codeInside <head> on every page
Custom <body> codeJust before </body> on every page
Custom CSSCompiled with your site’s stylesheet
Custom JSBundled as a standalone script tag
  1. Open Settings → Advanced.
  2. Paste the widget’s script tag into Custom head code or Custom body code — check the widget vendor’s instructions for which one to use.

  3. Click Save.
  • You can override any theme color or spacing value by name without touching the Theme panel.
  • Styles apply to the whole page.
  • Your custom CSS is applied after all built-in styles, so it wins in conflicts.
  • Your script runs after the page has fully loaded.
  • You can target any element on the page using a class you added via the Design tab.
Common issues

Script doesn’t run in the editor — custom scripts are only injected into the exported/deployed site, not the editing canvas. Use Preview mode to test.

Custom CSS isn’t taking effect — add !important after the value (e.g. color: red !important) to force it to override built-in styles.