Hey Toby,
Thanks for reaching out.
I was not able to produce any syntax errors with those snippets, so something in your process of copying and pasting the code might be the cause of the issues.
We cannot help with custom code, as per our support policy here. With that in mind, we cannot help troubleshoot custom code either.
However, I’m still glad to at least try and help here before closing this thread outright.
1. Using the code in your child theme’s functions.php file should not be a problem.
2. Please add both snippets to your functions.php file such that the syntax errors you report arise.
3. Then, go to http://gist.github.com and paste the ENTIRE, UN-EDITED functions.php file in to a Gist there. Publish the Gist, and share a link to it here.
4. Then, go to the front-end of your site where the syntax errors show up. Copy and paste the COMPLETE, UN-EDITED errors that pop up. Then go back to http://gist.github.com and make a second Gist with the full text of those errors in it.
☝️ With this information, I’ll be able to take a closer look here and try to spot the error. 😀
Thanks!
George