Answers ( 4 )

  1. Let’s say you see an amazing theme you want to use for your website, but you think it lacks some functionality, or you want to change some styling.
    This is where a child theme comes in handy.
    It’s basically a folder in your structure, which inherits everything from the parent theme. However, you can add functions, use different styling, change the template in any way possible, without modifying the parent theme.
    Why is this important? I unfortunately have seen things end up badly for a friend. Another developer modified one of the default WordPress themes directly. (he also never made a local backup, but that’s another discussion…)
    Now, the WordPress theme had an update, and not knowing this would update the whole look and feel of the website, my friend updated the site. All of the custom made CSS and functions were overwritten by the update, everything was set back to how the original theme look liked and functioned.
    If a child-theme was used, nothing would have changed, with a tiny tiny tiny chance things work differently.
    Since all the custom functions and styling are stored in a child theme, the parent theme can be updated at any time, without losing anything made custom for your website.
    You can update your parent theme and child theme independent of each other.
    The child theme is your responsibility, just like any developed theme is. If you have bugs in your child theme, fix them. If you have security issues in your child theme, get rid of them.
    If bugs or issues are in the parent theme and you resolve them in your child theme, that’s possible.
    If the parent theme is updated and they fix the bug/issue, you can remove the code in your child theme, or keep it there. That’s completely up to you.
    Keep in mind that a child theme only requires two files, fuctions.php and styles.css, to work. If you need to apply something to the functions.php use the one in the child theme. Same goes for the styles.css. If you want to customize the header via writing code, you would move a copy of the header.php to the child theme and edit that file.
    Anytime you have a theme update, it will update the parent theme thus leaving the child them untouched in which you do not lose any of your customization.

  2. A child theme appends functions to the main theme without changing the main theme. When the main theme is updated the appended functions don’t change because they’re in a separate file, though you may have to modify them after the update, but it’s better than rewriting them.

  3. In simpler terms a theme update could mess up your website unless you have a child theme. Suppose you’re using “Twenty Twenty” theme and you need to customize their function by using their hook. So you need to write a code of your theme functions.php file right?
    So, When the new update comes up of Hello theme which will replace that functions.php file with the new ones and your code will gone.
    So, If you have a child theme and you write your code on that child theme functions.php file, You are safe. This will not replaced by the update.
    Basically in the child theme, The main theme is enqueued. So you will get all the options of your main theme besides you got a extra space for showing your own poetry in the child theme.

  4. A child theme is basically an empty file which you can save your custom code and settings. If you want to keep your settings and CSS stuff after updating a theme then you won’t lose anything.
    What if don’t have custom CSS or theme settings then why a child theme?
    Well, it costs you nothing and it just better to do so because you may add change stuff later on.
    Anyways it’s free and doesn’t cause any pagespeed issue

Leave an answer

Choose from here the video type.

Put here the video id : https://www.youtube.com/watch?v=sdUUx5FdySs Ex: 'sdUUx5FdySs'.

What is the capital of USA? ( Washington )