Archived topic
customised css gone
6 replies · Started by Johan on March 22, 2020
A wordpress specialised company customised css just for the reservation pages. After updating generatepress all css customising is gone. The company told me that a theme updat shouldn''t do this? I am not technical enough. I can make a website that'all. I will put the old website back tomorrow before the update. What do I have to do.
Hi there,
Where was the CSS added?
If you use one of these methods then it would be saved through updates:
https://docs.generatepress.com/article/adding-css/
Thanks for reply,
In themes\generatepress the style_min.css file there was code added and this file was overwritten so I know now how to repair if it happens again. I updated a couple of plugins and I update generatepress all after each other. So I'm not 100% sure that it is generatepress who did it but other updates of plugins never did this. If it woud be your update who did this can it be prevented that added stylingcode is arased??
Johan
Johan,
Never, Ever... add custom code to your parent Theme, in this case GeneratePress, because once a new version is released and you update your Theme all customisations are lost.
Just use a Child Theme in case you need :
https://docs.generatepress.com/article/using-child-theme/
Or add the CSS using one of the methods Leo mentioned. (Recommended)
PS. Your "wordpress specialised company" should have mentioned this to you.
Thanks Vitor.
Johan, all files are erased and replaced during a theme and a premium plugin update which is why it's never a good idea to add your own code to the GP's core files :)
Thanks for answer. The company who wrote the styling for my reservation forms added it. I will change it as advised in previous message
No problem :)