Hi I have a (hopefully simple) problem. Ever since the latest update to SiteOrigin Vantage I cannot edit functions.php. I need to add some code. Even if I don’t add the code and try to update the file by clicking Update File without any modifications I still am unable to update. I get the error message below. Does this sound like the problem lies with the latest update since the file won’t update even without any modifications? Thanks!
Something went wrong. Your change may not have been saved. Please try again. There is also a chance that you may need to manually fix and upload the file over FTP.
Hi Josh
Thanks for getting in touch. Are you using a Vantage child theme?
Hi Andrew, so far as I know I am not using a child theme.
Thanks for the update.
Any changes made to the theme’s files will be lost whenever an update for Vantage is released. You can use Code Snippets to add custom functions or, alternatively, a child theme.
You can find a starter child theme Vantage here Page: Child Theme. Here is how to migrate Customizer settings from a parent to a child theme Post: Migrating Parent to Child Theme Customizer Settings.
Unfortunately, I’m unsure why the Theme Editor isn’t allowing edits to the parent theme functions.php file. It isn’t likely to be a change made to Vantage. The Theme Editor is a core WordPress feature.
Thanks Andrew. I also need to add code to index.php. Can code snippets do this?
Hi Josh
It’s a bit beyond what we can normally offer within our free support scope due to resource constraints. Here is an overview to understand when index.php is used https://developer.wordpress.org/themes/basics/template-hierarchy/. You can copy index.php from the Vantage parent into the Vantage child theme. Using Code Snippets, you’d add a conditional for whatever situation you’re focussing on, such as targeting the home page https://codex.wordpress.org/Conditional_Tags.