How to Add Custom Code Snippets to Your Website
We’ve simplified the process of adding custom JavaScript, CSS, HTML, or text snippets to your site, eliminating the need for external plugins. Fewer plugins reduce security risks and improve site performance.
Adding Scripts to the Header and Footer
Our user-friendly interface allows you to easily add code snippets like Google Analytics, Google Tag Manager, Facebook Pixel, custom CSS, SEO-related scripts, and more to your site’s header and footer—without editing files.
Steps to Add Header and Footer Scripts
- Log in to the admin area of your site.
- Navigate to your website admin: CBX Ultra > Settings > General.
- Expand the Header Code or Footer Code tabs.

- Paste your code snippet into the provided text area.

- Click the Save button.

Using Advanced Hook Content
For greater flexibility, you can add code snippets to specific areas of your site, such as page layouts, posts, headers, footers, or comments, using hook content with full conditional logic support.
Steps to Add Hook Content Snippets
- Go to your website admin: CBX Ultra > Settings > Hook Content.

- Select the hook content location where you want to add your snippet by either:
- Using the dropdown menu.
- Clicking the Select Hook Locations link.

Note: Clicking the Select Hook Locations link will open an interactive pop-up where you can choose available locations on your site.
- Paste your code snippet into the provided text area.

- Click the Save button.

Adding Conditional Logic
Conditional logic allows you to control when or where your hook content snippets are executed, such as on specific pages, posts, categories, or post types.
Steps to Add Conditional Logic
- After adding your snippet, click the Edit/Add Conditions link.

- Choose the condition(s) you want to apply, such as:
- General (Homepage, page views, etc.)
- Specific pages
- Categories
- Post types
- etc.
- Click the Save button to confirm your conditions.

- Click the Save button again to finalize the snippet.

Why Use Our Code Snippet Management Tools?
Avoid File Edits: Adding snippets directly to your site files can lead to messy management and complications during updates. Additionally, updates may overwrite custom code, causing you to lose your changes.
Streamlined Updates: Our snippet management tools ensure that your custom code remains intact, even when we perform routine updates to improve security and functionality.
Error Prevention: Our smart code snippet validation checks for common coding errors to help you avoid breaking your website.
With these tools, you can confidently add and manage code snippets without worrying about site security or functionality. Let us know if you need any assistance!