I've got to add some php functions to a theme so they can be used from different pages. The docs say one place to add custom php functions is in function.php
Cool!
My question is, what happens when I update a theme? Will the functions.php containing my changes be overwritten by a new one - thereby wiping out all my hard work?
My gut says yes but before I go and create a child theme I figured I'd ask to be sure.
Thanks
Mark
I'm just adding my 2 cents because this was the first Google result that came up when I was searching for the same question. Yes, your functions.php will be overwritten with a theme update.
I solved the problem by downloading the code-snippet plugin.
https://wordpress.org/plugins/code-snippets/
Now I can easily add and manage functions that won't be overwritten.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With