• Resolved Connie Busch

    (@conniebuschlcc)


    After nearly finishing a website project, I belatedly came across the possible need for a child theme to avoid overwrites when updating the theme. My question is related to this thread but simpler.

    When is a child necessary?

    In other words, following the previous thread: what types of customizations are in a theme.json?

    Specifically for my current work, I only needed to change the font attributes, colors, header, footer, some block spacings (“Layout” in the Site Editor) and of course the logo. The site is naumann.law (also redirected to, by lawofficeofdorothynaumann.com).

    Thanks!

    The page I need help with: [log in to see the link]

Viewing 8 replies - 1 through 8 (of 8 total)
  • Hello @conniebuschlcc,

    In general, a child theme is needed when you want to add features or update anything to a parent theme without directly editing its files. By creating a child theme, you can preserve your customizations even when the parent theme is updated.

    If you are using a custom theme called “TwentyTwentyThree” or any other theme, the need for a child theme depends on your specific requirements. Here are some common scenarios where a child theme may be beneficial:

    Customizations: If you want to modify the design, layout, or functionality of the theme, it is recommended to create a child theme. This way, your changes will be isolated from the parent theme and won’t be lost during updates.

    Theme Updates: When the parent theme receives updates, installing them can overwrite any modifications you’ve made directly to the parent theme’s files. By using a child theme, you can update the parent theme while keeping your customizations intact.

    Code Customizations: If you need to add custom code snippets, functions, or hooks to your theme, using a child theme allows you to do so without modifying the parent theme directly.

    Creating a child theme involves creating a new folder for your child theme and creating specific files like style.css and functions.php to inherit and modify the parent theme’s styles and functionality. You can refer to the WordPress Codex or the official WordPress Developer Documentation for detailed instructions on creating a child theme. Or you can contact with WordPress developer also.

    I found it from online. Because Writing about child themes will take a lot of time. I think this information will help you. Thanks.

    Thread Starter Connie Busch

    (@conniebuschlcc)

    Aminul,

    Thanks for your clear reply; I understand what you said. It didn’t answer my particular question though.

    I read the recent detailed thread by Kathryn about child themes, which stated that some types of customizations do not require child themes to be made. Only the types of changes made with a .json file require a child.

    So back to my original question:

    “…what types of customizations are in a theme.json?

    …for my current work, I only needed to change the font attributes, colors, header, footer, some block spacings (“Layout” in the Site Editor)?“

    Is a child theme necessary in my current project?

    Thanks.

    Hello @conniebuschlcc,

    You are correct. Not all types of customizations require a child theme. In some cases, you can make certain modifications without creating a child theme. Here are some scenarios where a child theme may not be necessary:

    Custom CSS: If you only need to add custom CSS styles to your theme, you can usually do so using the theme’s built-in customizer or a custom CSS plugin. This allows you to add your styles without directly modifying the theme files.

    Custom JavaScript: Similar to custom CSS.

    Custom Templates: If you want to create custom page templates you can often do this by creating template files in your theme’s directory. However, it’s still advisable to use a child theme if you plan to modify the core template files of the parent theme.

    Regarding the .json file you mentioned, it’s possible that the specific customization you have in mind is related to the theme’s configuration or settings stored in a JSON file. If that’s the case, then yes, using a child theme would be necessary to override or modify the default JSON settings without modifying the parent theme’s files directly.

    In summary, while some customizations can be made without a child theme, it’s generally recommended to use a child theme when making significant modifications to a parent theme, especially if you plan to modify core theme files or override default settings. It helps maintain the integrity of the parent theme and ensures that your customizations remain intact during theme updates.

    @conniebuschlcc,

    No, you don’t need a child theme. You want to work only css related tasks.

    @conniebuschlcc Hello Connie!

    In your case, a child theme is not needed. You can use the parent theme.

    Changing the font, color, margins, footers, and so on – all this can be done in a block editor. You can also register styles there.

    And if you need to add some function, then you can do it through a separate plugin.

    Therefore, in your case, a child theme is not needed.

    Moderator Kathryn Presner

    (@zoonini)

    Hey there @conniebuschlcc – thanks for starting a new thread here!

    When is a child necessary?

    Child themes are recommended when the changes you want to make require editing the theme files directly, and aren’t possible to make any other way. As you know, if you edit theme files directly, those changes will be overwritten every time the theme is updated. Putting your changes in a child theme protects them from being overwritten, while allowing you to keep the parent theme updated.

    Since Twenty Twenty-Three (TT3) is a block theme, many changes to its layout and design can be done in the Site Editor. These tweaks will not be lost when you update the theme, as they are stored in the database and they won’t get overwritten.

    Specifically for my current work, I only needed to change the font attributes, colors, header, footer, some block spacings (“Layout” in the Site Editor) and of course the logo. The site is naumann.law (also redirected to, by lawofficeofdorothynaumann.com).

    In terms of fonts, if you select one of the fonts included in TT3 – or choose one of their font variations such as Thin, Bold, etc. – those changes can be made directly in the Site Editor’s Styles area. They don’t require a child theme, as they won’t be overwritten on theme update.

    As for colours, the layout of Header and Footer template parts, and block spacing, it sounds like everything you want to do can be done within the Site Editor. Those changes will not be overwritten on theme update, so no child theme is needed.

    In other words, following the previous thread: what types of customizations are in a theme.json?

    These could include things like block presets and custom CSS properties. You can learn more about what goes into theme.json in this article.

    Let me know if this answers your question fully!

    If you encounter something specific that don’t see how to do in the Site Editor, do feel free to ask. It may very well be tucked away somewhere in the settings. ??

    Thread Starter Connie Busch

    (@conniebuschlcc)

    Thank you for the clarification, Kathryn. Yes, you answered my question with this–

    “Since Twenty Twenty-Three (TT3) is a?block theme, many changes to its layout and design can be done in the?Site Editor. These tweaks will?not?be lost when you update the theme, as they are stored in the database and they won’t get overwritten.”

    I am purposely doing only the style customizations in the Site Editor-block editor- to keep the project simple. I choose only the built-in font options. I’m relieved–and impressed with the theme creators–that those style changes do not get overwritten with Theme updates.

    Thanks again. I’m glad this is clarified with this new Forum topic.

    Moderator Kathryn Presner

    (@zoonini)

    You’re very welcome, @conniebuschlcc ! I’ll mark this topic as resolved. Feel free to start a new topic if you have other questions, and good luck with your site project!

Viewing 8 replies - 1 through 8 (of 8 total)
  • The topic ‘when is Child theme needed in twentytwentythree?’ is closed to new replies.