- This topic has 5 replies, 2 voices, and was last updated 6 months ago by Tom.
July 17, 2020 at 7:07 am #1366673Matic
I haven’t found a similar topic, so I created a new one.
I’d like to use child’s theme, which would be a duplicate of the main one. Why?
I would like to remove CSS and JS that is not needed, and substitute it with my own, CSS at least.
If have quite a lot Custom CSS, so creating my own CSS sheet would save a lot of kB’s. The problem is that Child’s theme loads my CSS, but it still loads the unused CSS from the main theme.
How can I fix that? I was thinking about simply duplicating the whole GeneratePress theme, but I am concerned about the Premium malfunction?
MaticJuly 17, 2020 at 2:34 pm #1367198TomLead DeveloperLead Developer
If you’re going to be using GP and GPP together, it may not be a good idea to completely de-construct GP itself. It will likely cause issues.
In GP 2.5.0, we’ve moved to using Sass to build our CSS, which may make it easier to remove certain aspects of CSS in custom builds. Even then, it’s likely not a good idea to do it unless you’re building a completely custom theme based on GeneratePress.July 18, 2020 at 8:21 am #1367840Matic
I was going to create my own theme in the long run, I am using GP as a template because I really like how fast it is and its design.
I just don’t need the numerous options/UI, and unneeded CSS and JS that come with it.
Is it good idea to copy the entire GP and then start hacking away code that I don’t need, but still keep the original for the updates and as a backup?July 18, 2020 at 9:25 am #1367901TomLead DeveloperLead Developer
The theme actually has minimal un-needed CSS and JS – I’ve worked really hard at that.
If you want to go lighter, you may want to look at something like this: https://github.com/Automattic/_sJuly 18, 2020 at 1:04 pm #1368052Matic
Generate Press is fantastic. It has cut my site’s request size to half by swapping the “best seo theme” for Generate Press.
Thanks for letting me know about the “_s”. I definetly look forward to developing my own theme but it will take a while, so in the meantime, I’ll enjoy GP Premium:)
Keep up the good work!July 18, 2020 at 3:14 pm #1368125TomLead DeveloperLead Developer
Thanks! We were able to slim the main stylesheet down about 10kb in the next version of GP as well – excited to get that out! 🙂
- You must be logged in to reply to this topic.