Archived topic
Do I need a child theme for JS and uploaded fonts?
5 replies · Started by Roland on March 19, 2018
Hi there,
I'm using some extra CSS files and JS files. This is working well, but I'm not sure if these extra files will be erased in case of an update. I saved the files in the wp-content/themes/generatepress/css respectively /js folder. I also want to upload an icon font to the /fonts folder.
My question is: Does an update delete all files in the theme folder or only the files that came with the theme?
Second question: If a child theme is better for my purposes and I install it, there is no folder /ccs and /js below /generatepress_child. I think I need to create these folders in my child theme for my css and js files. Is that correct?
Sorry for the stupid questions. I guess a) all files are deleted during an update and b) I'm better off with a child theme and just create the /css, /js, and /fonts folders myself. I'm just not sure...
Greetings from Munich
Roland
Hi there,
Something like that is better to be handled by the child theme:
https://docs.generatepress.com/article/using-child-theme/
Let me know if this helps.
Hi Leo,
Thank you for your confirmation.
I would basically like to know if an update will delete all files in /themes/generatepress or only those that belong to the theme. Just in case I don't use a child theme for once.
Hi there,
Yes, when WP updates a theme or plugin, it removes the folder completely, then uploads the new one.
Hi Leo, hi Tom,
thank you for your answers. I really appreciate your work.
Glad we could help!