- This topic has 7 replies, 2 voices, and was last updated 3 months, 4 weeks ago by
Leo.
-
AuthorPosts
-
November 2, 2020 at 9:45 am #1514907
Linda
Hi Support,
I’ve read 3 posts that popped up when I typed in my topic, but would still appreciate some further clarification.
-
1. In Tom’s 2015 post (https://generatepress.com/forums/topic/do-custom-theme-files-create-issues-with-frequent-gp-updates/) it sounded as if hooks were a better GP option than a child theme. Is this correct?
2. I have no idea how to use hooks. Does that mean I should consider a child theme? Or learn about hooks?
3. Made a number of minor changes to our theme, i.e., spacing before bulleted lists, padding on some images using WPโs Additional CSS and, lately, Tom’s Simple CSS plugin. Also modified a bit of PHP with Code Snippets plugin. It seems I can move ahead like this with no problems.
The exception is if I have to add php to functions.php. I now need to do that to permanently edit text in WooCommerce Memberships automatic emails. If not, update will remove the code (I think).
Questions:
Given I’ve been fiddling with our site and its CSS/PHP for over a year now, is it too late to set up a child theme? If I do, what do I do with all the bits of CSS and PHP added the other ways?Not sure if this is even a fair question to ask in this forum. If it isn’t, please let me koow.
Thanks for any advice you can offer on this,
Linda
November 2, 2020 at 10:09 am #1514956Leo
StaffCustomer SupportHi there,
It sort of depends on how much PHP and CSS you’ve added.
Can you give me ideas on how many lines you have?
Documentation: http://docs.generatepress.com/
Adding CSS: http://docs.generatepress.com/article/adding-css/November 2, 2020 at 12:39 pm #1515170Linda
Hi Leo,
Here’s what I have (I think! Haven’t done the course you suggested yet!)
PHP: 37
Simple CSS: 3
Additional CSS: 50I counted the lines with }. Not sure if I should have.
Linda
November 2, 2020 at 12:56 pm #1515195Leo
StaffCustomer SupportThat case you don’t need a child theme.
I’d say that if you have over 500 lines of CSS then you can start considering using a child theme ๐
Documentation: http://docs.generatepress.com/
Adding CSS: http://docs.generatepress.com/article/adding-css/November 2, 2020 at 3:37 pm #1515328Linda
Thanks for getting back to me so fast, Leo! And thanks for your reply … I can put off the child theme issue for a while.
One follow up clarification re. this from above:
The exception is if I have to add php to functions.php. I now need to do that to permanently edit text in WooCommerce Memberships automatic emails. If not, update will remove the code (I think).
Do you know if I can use Code Snippets to do above PHP edits?
Thanks again for your help,
Linda
November 2, 2020 at 4:00 pm #1515353Leo
StaffCustomer SupportTough to tell without seeing what the code you are trying to add.
Sounds like it’s a filter so it should work.
Have you tried testing the code in Code Snippets?
Documentation: http://docs.generatepress.com/
Adding CSS: http://docs.generatepress.com/article/adding-css/November 3, 2020 at 10:58 am #1516616Linda
No, I haven’t tried that yet. Positive idea though and I will give it a try. Thanks for the suggestion. Will let you know what happens.
Linda
November 3, 2020 at 12:01 pm #1516709Leo
StaffCustomer SupportA lot of things like these are just trial and error ๐
Documentation: http://docs.generatepress.com/
Adding CSS: http://docs.generatepress.com/article/adding-css/ -
AuthorPosts
- You must be logged in to reply to this topic.