Code Snippets documentation
Keep every PHP tweak, tracking script and CSS fix in one list. Each snippet can be switched on or off, is checked before it saves, and survives theme updates.
Overview
Small changes usually end up in functions.php. They disappear when the theme updates, nobody remembers why they are there, and one missing semicolon takes the site down.
Scripts for analytics or chat widgets get pasted into theme headers by whoever needed them, so a site ends up with code nobody can account for.
Plan: Free. Everything on this page is in the free plugin.
Setup
- Turn on Code Snippets under Developer Tools.
- Add a snippet, give it a name and choose PHP, HTML, CSS or JavaScript.
- Paste your code and save. WP Extended checks the syntax first.
- Switch the snippet on. If anything breaks, use Safe Mode to turn every snippet off.
Questions and troubleshooting
Is Code Snippets free?
Yes. Code Snippets is included in the free WordPress.org plugin.
What happens if a PHP snippet breaks my site?
Syntax checks catch the common mistakes before a snippet saves. If a snippet still causes a problem, switch on Safe Mode from the editor to turn every snippet off.
Will my snippets survive a theme update?
Yes. Snippets are stored by WP Extended, not in your theme, so updating or changing the theme doesn’t touch them.
Should I paste the opening PHP tag?
You don’t need to. Snippets that include their own opening tag are handled safely.
It isn’t working as expected
Check the module is switched on and its settings are saved. If another plugin does the same job, deactivate one of them. Then clear any page cache and test again. Still stuck? Pro customers can contact support; free users can post on the WordPress.org forum.
