Code Block adds PHP and HTML output, CSS, or JavaScript within a document. Use it for a specific custom behavior or markup that the ordinary elements do not provide.
Add and configure Code Block
Click Add, choose Code Block, and place it in the container.
Enter markup or PHP under Content > Content > PHP & HTML Code, or use the separate CSS Code and JavaScript Code fields.
Review Execute JavaScript and the optional Builder Label settings.
Configure the wrapper's layout, typography, and spacing under Design.
Save your changes.
Code Block controls in the Breakdance editor
This element has no children; use its own controls.
Controls
Responsive varies by breakpoint; Hover has a hover value; Shared applies across both. Linked controls have their own reference. In conditions, = means “is” and ≠ means “is not.”
Content > Content
Setting
Purpose and options
Behavior
PHP & HTML Code
Enter the php & html code code.
Shared
CSS Code
Enter the css code code.
Shared
JavaScript Code
Enter the JavaScript code.
Shared
Execute JavaScript
Run the code in the builder preview.
Shared
Disable Builder Label
On/off.
Shared
Builder Label
Enter the builder label. When:Disable Builder Label is unset.
The editor shows a label instead of the expected appearance
Review Builder Label and Disable Builder Label. The label identifies the code block while editing; inspect the actual front-end output.
The code causes an error
Check each language in its corresponding field and isolate the smallest failing change. PHP output, CSS styling, and browser JavaScript run in different contexts.