BLACK FRIDAY: 50% OFF all Pro plans Code: BLACKFRIDAY50
Pro from $10 a year or $30 lifetime, no code needed: Code: BLACKFRIDAY50
Ends Cyber Monday, 30 Nov. Lock in the price today. Code: BLACKFRIDAY50
Get 50% Off
Guide

Custom Code Pro

How to set up and use Custom Code in Bright Addons Pro.

Custom Code in Bright Addons Pro adds CSS, JavaScript or HTML snippets to the head, the start of the body or the footer. Show each snippet on the whole site, on the home page, on chosen pages or on chosen post types, and for everyone or only logged in or logged out visitors.

Part of: Bright Addons Pro. Before you start: Bright Addons Pro.

Set it up

  1. Go to Bright Addons Pro > Custom Code and click Add Snippet.

  2. Type a name, pick the Code type and the Place.

  3. Choose Show on and Visitors.

  4. Paste the code. CSS and JavaScript are wrapped in their tags for you.

  5. Click Publish to switch it on.

Content options

Code

Option What it does
Code type CSS, JavaScript or HTML.
Place Head, Start of the body or Footer.
Show on The whole site, Home page only, Chosen pages or posts, Chosen post types or Everywhere except chosen pages.
Visitors Everyone, Logged out visitors only or Logged in users only.
Order (lower prints first) Sets the order of snippets in the same place.
Code The snippet itself, in a code editor.
Bright Addons Pro

Unlock this and 90+ more Pro widgets

One license gives you every Pro widget, all 10 extensions, the Theme Builder and priority support. From $10 a year, with a 14-day money-back guarantee.

Tips

  • Paste tracking codes as HTML, with their own script tags.

  • Test a new snippet as a draft first, then publish it.

  • The start of the body place needs a theme that supports wp_body_open, which almost every theme does.

Questions and answers

Can a snippet break the editor?

No. Snippets never run in the WordPress admin or in the Elementor editor.

Who can add code?

Administrators who may post unfiltered HTML. Other users cannot save code.

How do I switch a snippet off?

Save it as a draft, or move it to the trash.

Need more help?

Check the troubleshooting guide, or contact support with the page address and what you expected to happen.

Troubleshooting guide
All guides