Hey Guys,
We are using a child theme and need to modfify the file site.js
We copy the file to the corresponding child folder, but changes don’t take effect because WordPress is looking for the file on the parent folder.
We saw that parent’s function.php sets where to look for the .js files and that is on the parent’s directory instead of the child’s.
Is there a way we can accomplish this by not modifying the parent function.php file?
In case there is no other way than modifying the parent’s file let us know and please include that change on the next release.
Thanks,
The “normal” way to do this is to add the call to your child theme folder functions.php to pull the js from your child theme directory vs the parent directory.
http://wordpress.org/support/topic/how-to-add-js-files-to-child-theme
Thanks @Christopher, but it doesn’t work for us, because the call is already defined on the parent functions.php and if we add it to the child functions.php the site breaks.
What we read around different forums is that the parent function has to be programmed conditionally and not load if it exists on the child theme that’s the code we’ll need to change and also be added to the new version.
Best,
Gotcha – makes sense to me 🙂
Probably explains why the custom functions didn’t work for me one our two test sites.
I switched one from using child theme to only use parent (since Google doesn’t like the CSS redirect, for their own peculiar reasons) and simply edited the parent functions.php to put my custom functions at end (like changing compression rate for images, removing excess css publication, etc.).
Hopefully this will be addressed soon for those using child theme for mods.