r/Wordpress • u/Realistic-Excuse-396 • 9h ago
Child theme, Code Snippets plugin, or a custom plugin — where do you keep your custom code?
I keep going back and forth on this for client sites.
- Child theme functions.php: simple, but code disappears if the client switches theme.
- Code Snippets plugin: easy to toggle, but harder to version control.
- Small custom 'site plugin': survives theme changes, works with Git.
My current rule: anything about how the site looks (template overrides, small layout tweaks, CSS) goes in the child theme. Anything about how the store works (checkout changes, custom fields, WooCommerce hooks, integrations) goes in a small site plugin. That way a redesign never breaks the business logic.
What's your approach, especially on sites you hand over to clients?