Site logo

Archived topic

When it it time to create a child theme?

7 replies · Started by Linda on November 2, 2020

Viewing posts 1–8 of 8

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

Hi 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?

Hi Leo,

Here's what I have (I think! Haven't done the course you suggested yet!)
PHP: 37
Simple CSS: 3
Additional CSS: 50

I counted the lines with }. Not sure if I should have.

Linda

That 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 :)

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

Tough 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?

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

A lot of things like these are just trial and error :)

This archived topic is closed to new replies.