{"id":3417,"date":"2025-05-01T15:44:50","date_gmt":"2025-05-01T15:44:50","guid":{"rendered":"https:\/\/codelia.io\/?p=3417"},"modified":"2025-05-02T05:47:14","modified_gmt":"2025-05-02T05:47:14","slug":"que-es-un-child-theme-y-como-crearlo","status":"publish","type":"post","link":"https:\/\/codelia.io\/en\/que-es-un-child-theme-y-como-crearlo\/","title":{"rendered":"What is a Child Theme and How to Create It?"},"content":{"rendered":"<div data-elementor-type=\"wp-post\" data-elementor-id=\"3417\" class=\"elementor elementor-3417\">\n\t\t\t\t<div class=\"elementor-element elementor-element-24c5471 e-flex e-con-boxed e-con e-parent\" data-id=\"24c5471\" data-element_type=\"container\" data-settings=\"{&quot;background_background&quot;:&quot;classic&quot;}\">\n\t\t\t\t\t<div class=\"e-con-inner\">\n\t\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t<div class=\"elementor-element elementor-element-1efeec6f e-flex e-con-boxed e-con e-parent\" data-id=\"1efeec6f\" data-element_type=\"container\">\n\t\t\t\t\t<div class=\"e-con-inner\">\n\t\t\t\t<div class=\"elementor-element elementor-element-718be867 elementor-widget elementor-widget-text-editor\" data-id=\"718be867\" data-element_type=\"widget\" data-widget_type=\"text-editor.default\">\n\t\t\t\t<div class=\"elementor-widget-container\">\n\t\t\t\t\t\t\t\t\t<h3><strong>What is a Child Theme<\/strong><\/h3>\n<p>A Child Theme is a WordPress theme that inherits the functionality and style of another theme, known as the Parent Theme. This structure allows you to customize the design and features without altering the original theme. By using a Child Theme, you can make changes without worrying about losing them when the Parent Theme is updated.<\/p>\n<h3><strong>Advantages of Using a Child Theme<\/strong><\/h3>\n<p>One of the main advantages of a Child Theme is that it provides a safe way to modify a website. By making all changes in the Child Theme, any updates to the Parent Theme will not affect your customizations. Additionally, it simplifies maintenance, as you can deactivate or switch the Child Theme without losing all your configurations and styles.<\/p>\n<h3><strong>How to Create a Child Theme<\/strong><\/h3>\n<p>To get started, first, you need to prepare the folder for the Child Theme where we will store all the theme files. In the file manager, navigate to wp-content \u2192 themes and create a new folder with a name similar to your active theme (e.g., themeName-child).<\/p>\n<p>Next, create a style file, known as style.css, which controls the design of your WordPress theme. It defines the relationship with the Parent Theme and overrides its styles. Add certain parameters such as the theme name, URI, and description in this file.<\/p>\n<p>Then, create the functions.php file, which will allow you to add new functionalities or modify existing ones. Make sure to correctly enqueue the Parent Theme styles from this file, using the following code.<\/p>\n<pre><code>&lt;?php\nadd_action( 'wp_enqueue_scripts', 'codelia_enqueue_child_theme_styles' );\n\nfunction codelia_enqueue_child_theme_styles() {\n    wp_enqueue_style( 'parent-style', get_template_directory_uri() . '\/style.css' );\n    wp_enqueue_style( 'child-style',\n        get_stylesheet_directory_uri() . '\/style.css',\n        array( 'parent-style' )\n            );\n}\n?&gt;<\/code><\/pre>\n<p>After this, all that's left is to activate the Child Theme from the Themes section in your WordPress admin panel.<\/p>\n\n<p>\u00a0<\/p>\n\t\t\t\t\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t<div class=\"elementor-element elementor-element-6421c99 e-flex e-con-boxed e-con e-parent\" data-id=\"6421c99\" data-element_type=\"container\" data-settings=\"{&quot;background_background&quot;:&quot;classic&quot;}\">\n\t\t\t\t\t<div class=\"e-con-inner\">\n\t\t\t\t<div class=\"elementor-element elementor-element-4461977 elementor-widget elementor-widget-heading\" data-id=\"4461977\" data-element_type=\"widget\" data-widget_type=\"heading.default\">\n\t\t\t\t<div class=\"elementor-widget-container\">\n\t\t\t\t\t<h2 class=\"elementor-heading-title elementor-size-default\">Guides and tips about WordPress<\/h2>\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t<div class=\"elementor-element elementor-element-fd065f5 elementor-align-center elementor-widget elementor-widget-button\" data-id=\"fd065f5\" data-element_type=\"widget\" data-widget_type=\"button.default\">\n\t\t\t\t<div class=\"elementor-widget-container\">\n\t\t\t\t\t\t\t\t\t<div class=\"elementor-button-wrapper\">\n\t\t\t\t\t<a class=\"elementor-button elementor-button-link elementor-size-sm\" href=\"https:\/\/codelia.io\/en\/category\/wordpress\/\">\n\t\t\t\t\t\t<span class=\"elementor-button-content-wrapper\">\n\t\t\t\t\t\t\t\t\t<span class=\"elementor-button-text\">Explore the blog<\/span>\n\t\t\t\t\t<\/span>\n\t\t\t\t\t<\/a>\n\t\t\t\t<\/div>\n\t\t\t\t\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t<\/div>","protected":false},"excerpt":{"rendered":"<p>Qu\u00e9 es un Child Theme Un Child Theme es un tema de WordPress que hereda la funcionalidad y el estilo [&hellip;]<\/p>","protected":false},"author":1,"featured_media":412,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_uag_custom_page_level_css":"","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":"disabled","footer-sml-layout":"","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":"set","ast-page-background-enabled":"default","ast-page-background-meta":{"desktop":{"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":""},"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":""}},"footnotes":""},"categories":[12],"tags":[15],"class_list":["post-3417","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-wordpress","tag-child-theme"],"aioseo_notices":[],"uagb_featured_image_src":{"full":["https:\/\/codelia.io\/wp-content\/uploads\/2020\/10\/online-coding-course-html-5-lesson-cover-img.jpg",1200,640,false],"thumbnail":["https:\/\/codelia.io\/wp-content\/uploads\/2020\/10\/online-coding-course-html-5-lesson-cover-img-150x150.jpg",150,150,true],"medium":["https:\/\/codelia.io\/wp-content\/uploads\/2020\/10\/online-coding-course-html-5-lesson-cover-img-300x160.jpg",300,160,true],"medium_large":["https:\/\/codelia.io\/wp-content\/uploads\/2020\/10\/online-coding-course-html-5-lesson-cover-img-768x410.jpg",768,410,true],"large":["https:\/\/codelia.io\/wp-content\/uploads\/2020\/10\/online-coding-course-html-5-lesson-cover-img-1024x546.jpg",1024,546,true],"1536x1536":["https:\/\/codelia.io\/wp-content\/uploads\/2020\/10\/online-coding-course-html-5-lesson-cover-img.jpg",1200,640,false],"2048x2048":["https:\/\/codelia.io\/wp-content\/uploads\/2020\/10\/online-coding-course-html-5-lesson-cover-img.jpg",1200,640,false],"trp-custom-language-flag":["https:\/\/codelia.io\/wp-content\/uploads\/2020\/10\/online-coding-course-html-5-lesson-cover-img.jpg",18,10,false]},"uagb_author_info":{"display_name":"Codelia","author_link":"https:\/\/codelia.io\/en\/author\/santiagobrena9gmail-com\/"},"uagb_comment_info":0,"uagb_excerpt":"Qu\u00e9 es un Child Theme Un Child Theme es un tema de WordPress que hereda la funcionalidad y el estilo [&hellip;]","_links":{"self":[{"href":"https:\/\/codelia.io\/en\/wp-json\/wp\/v2\/posts\/3417","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/codelia.io\/en\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/codelia.io\/en\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/codelia.io\/en\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/codelia.io\/en\/wp-json\/wp\/v2\/comments?post=3417"}],"version-history":[{"count":19,"href":"https:\/\/codelia.io\/en\/wp-json\/wp\/v2\/posts\/3417\/revisions"}],"predecessor-version":[{"id":3482,"href":"https:\/\/codelia.io\/en\/wp-json\/wp\/v2\/posts\/3417\/revisions\/3482"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/codelia.io\/en\/wp-json\/wp\/v2\/media\/412"}],"wp:attachment":[{"href":"https:\/\/codelia.io\/en\/wp-json\/wp\/v2\/media?parent=3417"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/codelia.io\/en\/wp-json\/wp\/v2\/categories?post=3417"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/codelia.io\/en\/wp-json\/wp\/v2\/tags?post=3417"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}