Safely add custom PHP, JavaScript, CSS and HTML to your Joomla website
Code Snippets for Joomla is a Joomla component with a system plugin that allows you to add custom code snippets without editing template files or core files. All snippets are managed centrally, remain update-safe, and can be enabled or disabled at any time.
Requirements
Joomla 4.0 or higher
Joomla 5 supported
PHP 7.4 or higher
Administrator access to your Joomla website
Automatic Installation
Log in to your Joomla administrator panel
Navigate to System → Install → Extensions
Select the Upload Package File tab
Click Browse and select the downloaded ZIP file
Click Upload & Install
The component and system plugin will be installed automatically.
Manual Installation
Unzip the downloaded package on your computer
Upload the folders to your Joomla installation using FTP
Log in to the Joomla administrator panel
Navigate to System → Discover
Find Code Snippets and click Install
Enabling the Plugin
Navigate to System → Manage → Plugins
Find Code Snippets (System Plugin)
Enable the plugin
The plugin is required to execute the snippets on the frontend.
Using Code Snippets
Creating a New Snippet
Navigate to Components → Code Snippets
Click New
Enter a title for the snippet
Select the snippet type
Add your code
Set the snippet to Enabled
Save the snippet
The snippet is now active on your website.
Snippet Types
PHP Snippets
Use PHP snippets for custom logic, filters, or small functional additions.
Executed during Joomla’s lifecycle
Intended for developers or advanced users
Errors in PHP code can affect the site
Always test PHP snippets carefully.
JavaScript Snippets
Use JavaScript snippets to add tracking scripts, custom behavior, or third-party integrations.
Typical use cases:
Google Analytics
Custom frontend interactions
External script injections
CSS Snippets
Use CSS snippets for global styling changes.
Examples:
Override template styles
Add small layout fixes
Apply custom branding
CSS snippets are loaded automatically on the frontend.
HTML Snippets
Use HTML snippets for static markup or verification tags.
Examples:
Meta verification tags
Inline HTML blocks
Custom markup injections
Enabling and Disabling Snippets
Each snippet can be enabled or disabled individually.
Disabled snippets are not loaded
Snippets remain stored and editable
Useful for testing or temporary changes
How It Works
You create a snippet in the component
The snippet is stored in the database
The system plugin loads enabled snippets
Code is injected without modifying templates
Joomla updates do not affect your snippets
Google Analytics Example
To add Google Analytics:
Create a new JavaScript or HTML snippet
Paste the tracking code provided by Google
Enable the snippet
Save
No template editing is required.
Compatibility
Joomla 4
Joomla 5
Joomla 6
Compatible with all templates
Works with YOOtheme Pro
Safe to use with caching and performance extensions
Subscription and Usage
You can continue using Code Snippets after your subscription ends. An active subscription is required only for updates and support.
Order Now
Unlimited Websites
€ 19,99
Support forone website. 12 monthsof support. 12 monthsof access to downloads.
✓ 30-Day Money-Back Guarantee Not satisfied? Get a full refund within 30 days — no questions asked.