Adding custom PHP to functions.php? Theme updates will erase your code. Use Code Snippets plugin instead.
Setup:
1. Install “Code Snippets” plugin
2. Snippets → Add New
3. Paste your PHP code
4. Activate
Why Better:
// Your code survives theme updates // Can enable/disable snippets without deleting // Organized library of all custom code // Export/import snippets between sites
Example Snippet:
// Remove WordPress version from header
remove_action('wp_head', 'wp_generator');
