{"id":16797,"date":"2025-09-15T14:15:38","date_gmt":"2025-09-15T12:15:38","guid":{"rendered":"https:\/\/surver.nl\/?post_type=kennisbank&#038;p=16797"},"modified":"2025-09-15T16:57:16","modified_gmt":"2025-09-15T14:57:16","slug":"create-child-theme-in-wordpress","status":"publish","type":"kennisbank","link":"https:\/\/surver.nl\/en\/kennisbank\/child-theme-maken-in-wordpress\/","title":{"rendered":"Create child theme in WordPress"},"content":{"rendered":"<figure class=\"wp-block-image size-full\"><img fetchpriority=\"high\" decoding=\"async\" width=\"1024\" height=\"1024\" src=\"https:\/\/surver.nl\/wp-content\/uploads\/2025\/09\/694b2fef-ceb3-480c-b1e5-e618f8cd861a-1.png\" alt=\"Child theme\" class=\"wp-image-16799\" srcset=\"https:\/\/surver.nl\/wp-content\/uploads\/2025\/09\/694b2fef-ceb3-480c-b1e5-e618f8cd861a-1.png 1024w, https:\/\/surver.nl\/wp-content\/uploads\/2025\/09\/694b2fef-ceb3-480c-b1e5-e618f8cd861a-1-300x300.png 300w, https:\/\/surver.nl\/wp-content\/uploads\/2025\/09\/694b2fef-ceb3-480c-b1e5-e618f8cd861a-1-150x150.png 150w, https:\/\/surver.nl\/wp-content\/uploads\/2025\/09\/694b2fef-ceb3-480c-b1e5-e618f8cd861a-1-768x768.png 768w, https:\/\/surver.nl\/wp-content\/uploads\/2025\/09\/694b2fef-ceb3-480c-b1e5-e618f8cd861a-1-12x12.png 12w\" sizes=\"(max-width: 1024px) 100vw, 1024px\" \/><\/figure>\n\n\n\n<p>If you work with Elementor and want to change the style or structure of your site, you often quickly end up with theme files. If you do that directly in the main theme, you will lose your changes as soon as an update appears. The solution is a child theme.<\/p>\n\n\n\n<p>With a child theme, you can safely make your own modifications without having updates from the parent theme (in this case Hello Elementor) overwrite your work.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">What is a child theme?<\/h2>\n\n\n\n<p>A child theme is actually a kind of layer on top of your current theme. The parent theme (for example <em>Hello Elementor<\/em>) provides all the standard functionality and formatting. The child theme ensures that you can safely make changes to it, without having to mess around in the original files.<\/p>\n\n\n\n<p>You can compare it to a protective cover on your phone: the phone remains the same, but you can modify or replace the cover without damaging the phone itself. It works the same way with child themes: the parent theme remains intact, while you make adjustments in the \"protective\" layer on top.<\/p>\n\n\n\n<p>What happens in practice:<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li><strong>The parent theme<\/strong> defines the basics: the standard styles, features and templates.<\/li>\n\n\n\n<li><strong>The child theme<\/strong> adds your own CSS, functions and custom files.<\/li>\n\n\n\n<li><strong>Together<\/strong> they shape what visitors ultimately see.<\/li>\n<\/ul>\n\n\n\n<p>The big advantage is that updates to the parent theme do not take away from your work. So you keep all the freedom to customize your site as you wish, without having to worry every time an update will reset everything to default.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Why use a child theme?<\/h2>\n\n\n\n<p>The biggest advantage of a child theme is that your work <strong>update-proof<\/strong> stays. Normally, updates to your theme overwrite all files. If you are working in a child theme, then only the files of the parent theme will be refreshed and your changes will be kept clean.<\/p>\n\n\n\n<p>In addition, a child theme gives you <strong>overview<\/strong>. Everything you customize yourself - from CSS rules to custom templates - is in a separate folder. So you never have to search for what you added yourself and what comes with the theme by default.<\/p>\n\n\n\n<p>And perhaps most importantly, it is <strong>safer<\/strong>. If you make a mistake in your child theme, the parent theme remains unaffected. So you can always fall back on the original files without bringing down the whole site.<\/p>\n\n\n\n<p>Elementor itself recommends child themes as soon as you want more than the default styling options and widgets. In other words, if you really want the freedom to customize your site in detail, then a child theme is the right basis.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Here's how to create a child theme for Hello Elementor<\/h2>\n\n\n\n<h3 class=\"wp-block-heading\">1. Create a folder<\/h3>\n\n\n\n<p>Via SFTP or your hosting's file manager, go to:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>\/wp-content\/themes\/\n<\/code><\/pre>\n\n\n\n<p>Here you see a folder <code>hello-elementor<\/code>. In the same directory, create a new folder named:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>hello-elementor-child\n<\/code><\/pre>\n\n\n\n<h3 class=\"wp-block-heading\">2. Add a style.css file<\/h3>\n\n\n\n<p>In the new folder, create a file <code>style.css<\/code> and paste this code:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>\/*\n Theme Name: Hello Elementor Child\n Description: Child theme for Hello Elementor\n Author: [your name or company]\n Template: hello-elementor\n Version: 1.0.0\n Text Domain: hello-elementor-child\n*\/\n<\/code><\/pre>\n\n\n\n<p>Feel free to modify the name, author and description. The important thing is that <strong>Template<\/strong> corresponds exactly to the parent theme's folder name: <code>hello-elementor<\/code>.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">3. Add functions.php<\/h3>\n\n\n\n<p>In the same folder, create a file <code>functions.php<\/code> and add this:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>&lt;?php\nadd_action( 'wp_enqueue_scripts', function() {\n    wp_enqueue_style( 'parent-style', get_template_directory_uri() . '\/style.css' );\n});\n?&gt;\n<\/code><\/pre>\n\n\n\n<p>This code will automatically load the styles from Hello Elementor, on top of the styles you add yourself in your child theme.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">4. Activate your child theme<\/h3>\n\n\n\n<p>Upload both files to the folder <code>hello-elementor-child<\/code>. Log in to your WordPress dashboard, go to <strong>View &gt; Themes<\/strong> and activate your new child theme. Your site will look the same, but you can safely put your changes in the child theme from now on.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">5. (Optional) Add a screenshot<\/h3>\n\n\n\n<p>Do you want your child theme to also have a recognizable image in the theme overview? Place a PNG image of <strong>1200\u00d7900 px<\/strong> in your child-theme folder and name it <code>screenshot.png<\/code>.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">How will you proceed?<\/h2>\n\n\n\n<p>From now on, make all your CSS changes in <code>style.css<\/code> of your child theme. For templates, it works like this: copy a file from Hello Elementor to the child theme folder and edit that file. Anything you don't copy will automatically keep coming from the parent theme.<\/p>\n\n\n\n<p>So you can safely modify headers, footers or specific template files, without the risk that an update to Hello Elementor will undo your work.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Example: adding your own CSS rule<\/h2>\n\n\n\n<p>Suppose you want to give the buttons on your site your own color, because the default settings of Hello Elementor are not enough. In your child theme, you can easily do this by adding in <code>style.css<\/code> add an extra line, for example:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>button,\n.elementor-button {\n  background-color: #0056b3;\n  color: #ffffff;\n  border-radius: 4px;\n}\n<\/code><\/pre>\n\n\n\n<p>Once you save the file and refresh the cache, all the buttons on your site will have this style. Since this is in the child theme, it will be preserved when Hello Elementor is updated.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Example: modifying a template file<\/h2>\n\n\n\n<p>Want to build your site's header a little differently? Then copy <code>header.php<\/code> from the Hello Elementor folder to the folder of your child theme. Adjust the HTML or PHP there, for example to add an additional menu location.<\/p>\n\n\n\n<p>WordPress uses your version of <code>header.php<\/code>, while all other files just keep coming from the parent theme. This allows you to make targeted and safe changes.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Need help with child themes?<\/h2>\n\n\n\n<p>Creating a child theme is not technically difficult, but can be exciting when you first do it. At Surver, we build websites with a secure structure by default and have a lot of experience with themes like Elementor, as well as many others. <br>Would you like us to take care of this for you, or are you looking for support through our <a href=\"https:\/\/surver.nl\/en\/services\/webmaster-service\/\">webmaster service<\/a>, then we're ready to help you - whether it's small tweaks or complete custom solutions.<\/p>","protected":false},"excerpt":{"rendered":"<p>Werk je met Elementor en wil je de stijl of structuur van je site aanpassen, dan kom je vaak al snel bij themabestanden terecht. Doe je dat rechtstreeks in het hoofdthema, dan raak je je wijzigingen kwijt zodra er een update verschijnt. De oplossing is een child theme. Met een child theme kun je veilig [&hellip;]<\/p>\n","protected":false},"author":2,"featured_media":16799,"template":"","meta":{"_acf_changed":false,"site-sidebar-layout":"default","site-content-layout":"","ast-site-content-layout":"default","site-content-style":"default","site-sidebar-style":"default","ast-global-header-display":"","ast-banner-title-visibility":"","ast-main-header-display":"","ast-hfb-above-header-display":"","ast-hfb-below-header-display":"","ast-hfb-mobile-header-display":"","site-post-title":"","ast-breadcrumbs-content":"","ast-featured-img":"","footer-sml-layout":"","ast-disable-related-posts":"","theme-transparent-header-meta":"","adv-header-id-meta":"","stick-header-meta":"","header-above-stick-meta":"","header-main-stick-meta":"","header-below-stick-meta":"","astra-migrate-meta-layouts":"default","ast-page-background-enabled":"default","ast-page-background-meta":{"desktop":{"background-color":"var(--ast-global-color-4)","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""},"tablet":{"background-color":"","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""},"mobile":{"background-color":"","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""}},"ast-content-background-meta":{"desktop":{"background-color":"var(--ast-global-color-5)","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""},"tablet":{"background-color":"var(--ast-global-color-5)","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""},"mobile":{"background-color":"var(--ast-global-color-5)","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""}}},"kennisbank_categorieen":[62],"class_list":["post-16797","kennisbank","type-kennisbank","status-publish","has-post-thumbnail","hentry","kennisbank_categorieen-wordpress"],"acf":[],"_links":{"self":[{"href":"https:\/\/surver.nl\/en\/wp-json\/wp\/v2\/kennisbank\/16797","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/surver.nl\/en\/wp-json\/wp\/v2\/kennisbank"}],"about":[{"href":"https:\/\/surver.nl\/en\/wp-json\/wp\/v2\/types\/kennisbank"}],"author":[{"embeddable":true,"href":"https:\/\/surver.nl\/en\/wp-json\/wp\/v2\/users\/2"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/surver.nl\/en\/wp-json\/wp\/v2\/media\/16799"}],"wp:attachment":[{"href":"https:\/\/surver.nl\/en\/wp-json\/wp\/v2\/media?parent=16797"}],"wp:term":[{"taxonomy":"kennisbank_categorieen","embeddable":true,"href":"https:\/\/surver.nl\/en\/wp-json\/wp\/v2\/kennisbank_categorieen?post=16797"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}