{"id":34862,"date":"2023-01-02T08:55:00","date_gmt":"2023-01-02T01:55:00","guid":{"rendered":"https:\/\/www.rumahweb.com\/journal\/?p=34862"},"modified":"2023-02-17T16:02:51","modified_gmt":"2023-02-17T09:02:51","slug":"apa-itu-child-theme-adalah","status":"publish","type":"post","link":"https:\/\/www.rumahweb.com\/journal\/apa-itu-child-theme-adalah\/","title":{"rendered":"Apa itu Child Theme dan Cara Membuatnya di WordPress"},"content":{"rendered":"\n<p>Beberapa theme premium WordPress menyertakan child theme yang bisa digunakan untuk <em>customize <\/em>tampilan pada website. Lalu, apa sebenarnya child theme ini dan bagaimana cara menggunakannya? <\/p>\n\n\n\n\n\n<p>Sebelum kita masuk pembahasan mengenai child theme, kami akan memberikan gambaran mulai dari parent kemudian child theme. Agar bagi teman-teman yang belum mengetahui apa itu child theme, dapat memiliki gambaran apa yang akan kami bahas. Mari kita mulai.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Apa itu <em>Parent Theme<\/em>?<\/h2>\n\n\n\n<p>Parent theme adalah theme WordPress yang lengkap, yaitu memiliki file template dan asset yang dibutuhkan agar theme tersebut dapat berfungsi. <\/p>\n\n\n\n<p>File yang paling penting didalam theme WordPress adalah index dan style.css. Tetapi sebagian besar theme juga menyertakan file PHP, JavaScript, localization files, dan teks file.<\/p>\n\n\n\n<p>Agar memiliki gambaran lebih jelas, berikut isi dari parent theme twentytwentythree:<\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><a href=\"https:\/\/www.rumahweb.com\/journal\/wp-content\/uploads\/2023\/01\/theme-twentytwentythree.jpg\"><img loading=\"lazy\" decoding=\"async\" width=\"720\" height=\"335\" src=\"https:\/\/www.rumahweb.com\/journal\/wp-content\/uploads\/2023\/01\/theme-twentytwentythree.jpg\" alt=\"isi theme twentytwentythree\" class=\"wp-image-35135\" srcset=\"https:\/\/www.rumahweb.com\/journal\/wp-content\/uploads\/2023\/01\/theme-twentytwentythree.jpg 720w, https:\/\/www.rumahweb.com\/journal\/wp-content\/uploads\/2023\/01\/theme-twentytwentythree-300x140.jpg 300w, https:\/\/www.rumahweb.com\/journal\/wp-content\/uploads\/2023\/01\/theme-twentytwentythree-370x172.jpg 370w, https:\/\/www.rumahweb.com\/journal\/wp-content\/uploads\/2023\/01\/theme-twentytwentythree-270x126.jpg 270w, https:\/\/www.rumahweb.com\/journal\/wp-content\/uploads\/2023\/01\/theme-twentytwentythree-570x265.jpg 570w\" sizes=\"auto, (max-width: 720px) 100vw, 720px\" \/><\/a><\/figure>\n\n\n\n<p>Sebagai catatan isi theme diatas akan berbeda disetiap masing-masing theme.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Apa itu <em>Child Theme?<\/em><\/h2>\n\n\n\n<p>Child theme adalah subtema untuk mengatur tampilan dan fungsi theme website seperti pada parent theme. Perbedaanya, child theme ini memiliki direktori berbeda dengan parent, sehingga perubahan apapun pada child theme tidak akan menganggu atau merusak parent theme.<\/p>\n\n\n\n<p>Sebagai contoh jika Anda mengatur kode function atau <a href=\"https:\/\/blog.rumahweb.com\/css-adalah\/\" title=\"css adalah\">CSS<\/a> tertentu pada parent themes, kode tersebut akan hilang ketika ada update theme. Berbeda jika Anda memakai child theme, update parent theme tidak akan mengubah kode yang Anda buat pada child theme.<\/p>\n\n\n\n<p>Sama seperti parent theme, direktori child theme minimal harus memiliki file function.php dan style.css. Tetapi Anda bisa melakukan <em>customize <\/em>theme dengan menambahkan file maupun kode lain untuk mengatur layout maupun parameter tertentu.<\/p>\n\n\n\n<p>Penting untuk diketahui child theme tidak bisa berdiri sendiri, child theme harus disandingkan dengan parent theme agar dapar berfungsi.<\/p>\n\n\n\n<p>Setelah mengetahui apa itu parent dan child theme, kami akan membahas pentingnya membuat child theme pada website berbasis WordPress.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Mengapa harus membuat child theme?<\/h2>\n\n\n\n<p>Seperti sedikit yang telah kami kemukakan diatas, membuat child theme memungkinan Anda untuk mengubah dan mengatur parent theme tanpa kehilangan penyesuaian yang asli. <\/p>\n\n\n\n<p>Tetapi tanpa child theme, jika Anda ingin melakukan modifikasi style.css, function.php, maupun customize lain, Anda harus melakukannya langsung pada file parent theme. Hal ini menyebabkan perubahan yang Anda lakukan akan tertimpa dan hilang, setiap kali melakukan update theme.<\/p>\n\n\n\n<p>Tentu saja ini menjadi kerugian besar bagi Anda, yang membutuhkan banyak modifikasi theme baik untuk website skala kecil, pribadi, maupun skala besar.<\/p>\n\n\n\n<p>Jika demikian Anda akan dihadapkan dengan dua pilihan sulit, yaitu; Pertama Anda bisa mengabaikan notifikasi update theme, berarti akan menyebabkan masalah kompabilitas dan keamanan. Atau yang kedua Anda dapat melakukan update theme dan kehilangan semua modifikasi yang dilakukan. <\/p>\n\n\n\n<p>Tentu saja semua kerja keras dan waktu yang dibutuhkan untuk membuat modifikasi tersebut akan sia-sia. Dengan pilihan tersebut, berikut dua manfaat mengapa harus membuat child theme pada website WordPress.<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>Menyimpan modifikasi ini berbeda dengan direktori parent theme website Anda, sehingga memungkinkan dipindah kesitus lain.<\/li>\n\n\n\n<li>Apabila terjadi kerusakan pada child theme Anda baik itu dalam proses pengembangan maupun setelah website jadi. Anda tidak perlu kawatir, karena cukup mengembalikan ke parent theme sehingga website Anda akan kembali seperti semula seperti tampilan parent theme.<\/li>\n<\/ul>\n\n\n\n<p>Setelah kita mengetahui perbedaan parent dan child theme dan manfaat child theme, selanjutnya kami akan membahas lebih dalam cara membuat child themes WordPress.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">3 Cara Membuat Child Theme WordPress<\/h2>\n\n\n\n<p>Kami akan menuliskan dengan langkah-langkah yang mudah dipahami, agar Anda dapat memahami cara membuat child theme di WordPress.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">Child Theme dari pengembang theme<\/h3>\n\n\n\n<p>Banyak pengembang theme sudah menyediakan child theme dalam bundle theme yang mereka buat. Biasanya tersedia untuk theme premium seperti theme Astra yang populer telah ada child theme yang dapat Anda gunakan.<\/p>\n\n\n\n<p>Anda dapat mendapatkan theme premium Astra Pro secara gratis di Rumahweb. Untuk informasi lebih lanjut dan cara mendapatkannya, silakan mengunjungi link <a href=\"https:\/\/www.rumahweb.com\/journal\/astra-theme\/\" title=\"Astra Theme\">Astra Theme<\/a> <\/p>\n\n\n\n<p>Tidak hanya theme premium, beberapa theme free juga menyediakan fitur child theme.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">Plugin Child Theme<\/h3>\n\n\n\n<p>Apabila pengembang theme Anda tidak menyediakan child theme, tidak perlu kawatir. Karena Anda tetap bisa menggunakan plugin untuk membuat child theme di website.<\/p>\n\n\n\n<p>Berikut beberapa penyedia plugin child theme gratis yang paling populer:<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li><a rel=\"noreferrer noopener\" target=\"_blank\" href=\"https:\/\/wordpress.org\/plugins\/child-theme-wizard\/\">Child Theme Wizard<\/a><\/li>\n\n\n\n<li><a rel=\"noreferrer noopener\" target=\"_blank\" href=\"https:\/\/wordpress.org\/plugins\/wp-child-theme-generator\/\">WP Child Theme Generator<\/a><\/li>\n\n\n\n<li><a rel=\"noreferrer noopener\" target=\"_blank\" href=\"https:\/\/wordpress.org\/plugins\/wps-child-theme-generator\/\">WPS Child Theme Generator<\/a><\/li>\n\n\n\n<li><a rel=\"noreferrer noopener\" target=\"_blank\" href=\"https:\/\/wordpress.org\/plugins\/orbisius-child-theme-creator\/\">Child Theme Creator by Orbisius<\/a><\/li>\n<\/ul>\n\n\n\n<p>Sebagai contoh plugin Child Theme Wizard silakan diinstall dihalaman dashboard WordPress Anda &gt; kemudian kemenu Tools &gt; Child Theme Wizard dan isi konfigurasi seperti screenshot dibawah ini:<\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><a href=\"https:\/\/www.rumahweb.com\/journal\/wp-content\/uploads\/2022\/12\/child-theme-wordpress.jpg\"><img loading=\"lazy\" decoding=\"async\" width=\"781\" height=\"500\" src=\"https:\/\/www.rumahweb.com\/journal\/wp-content\/uploads\/2022\/12\/child-theme-wordpress.jpg\" alt=\"child theme wordpress\" class=\"wp-image-34918\" srcset=\"https:\/\/www.rumahweb.com\/journal\/wp-content\/uploads\/2022\/12\/child-theme-wordpress.jpg 781w, https:\/\/www.rumahweb.com\/journal\/wp-content\/uploads\/2022\/12\/child-theme-wordpress-300x192.jpg 300w, https:\/\/www.rumahweb.com\/journal\/wp-content\/uploads\/2022\/12\/child-theme-wordpress-768x492.jpg 768w, https:\/\/www.rumahweb.com\/journal\/wp-content\/uploads\/2022\/12\/child-theme-wordpress-370x237.jpg 370w, https:\/\/www.rumahweb.com\/journal\/wp-content\/uploads\/2022\/12\/child-theme-wordpress-270x173.jpg 270w, https:\/\/www.rumahweb.com\/journal\/wp-content\/uploads\/2022\/12\/child-theme-wordpress-470x300.jpg 470w, https:\/\/www.rumahweb.com\/journal\/wp-content\/uploads\/2022\/12\/child-theme-wordpress-570x365.jpg 570w, https:\/\/www.rumahweb.com\/journal\/wp-content\/uploads\/2022\/12\/child-theme-wordpress-740x474.jpg 740w\" sizes=\"auto, (max-width: 781px) 100vw, 781px\" \/><\/a><\/figure>\n\n\n\n<p>Klik Create Child Theme setelah berhasil create &gt; kemudian aktifkan child theme ini dimenu Appearance &gt; Theme.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">Child Theme Generator<\/h3>\n\n\n\n<p>Selain memakai plugin child theme, Anda bisa menggunakan child theme generator melalui web browser. <\/p>\n\n\n\n<p><a href=\"https:\/\/childtheme-generator.com\/\" title=\"\">Child theme generator<\/a> adalah situs populer untuk generate child theme. Anda hanya perlu memasukan beberapa informasi, klik generate, kemudian Anda bisa download filenya.<\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><a href=\"https:\/\/www.rumahweb.com\/journal\/wp-content\/uploads\/2022\/12\/child-theme-generator.jpg\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"617\" src=\"https:\/\/www.rumahweb.com\/journal\/wp-content\/uploads\/2022\/12\/child-theme-generator-1024x617.jpg\" alt=\"child theme generator\" class=\"wp-image-34919\" srcset=\"https:\/\/www.rumahweb.com\/journal\/wp-content\/uploads\/2022\/12\/child-theme-generator-1024x617.jpg 1024w, https:\/\/www.rumahweb.com\/journal\/wp-content\/uploads\/2022\/12\/child-theme-generator-300x181.jpg 300w, https:\/\/www.rumahweb.com\/journal\/wp-content\/uploads\/2022\/12\/child-theme-generator-768x463.jpg 768w, https:\/\/www.rumahweb.com\/journal\/wp-content\/uploads\/2022\/12\/child-theme-generator-370x223.jpg 370w, https:\/\/www.rumahweb.com\/journal\/wp-content\/uploads\/2022\/12\/child-theme-generator-270x163.jpg 270w, https:\/\/www.rumahweb.com\/journal\/wp-content\/uploads\/2022\/12\/child-theme-generator-570x344.jpg 570w, https:\/\/www.rumahweb.com\/journal\/wp-content\/uploads\/2022\/12\/child-theme-generator-740x446.jpg 740w, https:\/\/www.rumahweb.com\/journal\/wp-content\/uploads\/2022\/12\/child-theme-generator.jpg 1030w\" sizes=\"auto, (max-width: 1024px) 100vw, 1024px\" \/><\/a><\/figure>\n\n\n\n<p>Setelah itu silakan upload file child theme tersebut kedalam website WordPress Anda dari menu Appearance &gt; Theme.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Penutup<\/h2>\n\n\n\n<p>Child theme adalah tema duplikat yang bisa digunakan untuk memodifikasi tampilan tema secara custom, tanpa harus takut apabila terjadi perubahan script pada parent atau induk themenya.<\/p>\n\n\n\n<p>Dengan Child theme, script customize CSS atau function yang Anda buat tidak akan berubah, walaupun Anda melakukan update pada parent theme.<\/p>\n\n\n\n<p>Demikian artikel kami tentang apa itu child theme, manfaat dan cara membuat child theme di WordPress. Semoga bermanfaat.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Beberapa theme premium WordPress menyertakan child theme yang bisa digunakan untuk customize tampilan pada website. Lalu, apa sebenarnya child theme ini dan bagaimana cara menggunakannya? Sebelum kita masuk pembahasan mengenai child theme, kami akan memberikan gambaran mulai dari parent kemudian child theme. Agar bagi teman-teman yang belum mengetahui apa itu child theme, dapat memiliki gambaran [&hellip;]<\/p>\n","protected":false},"author":321,"featured_media":35046,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"jetpack_post_was_ever_published":false,"_jetpack_newsletter_access":"","_jetpack_dont_email_post_to_subs":false,"_jetpack_newsletter_tier_id":0,"_jetpack_memberships_contains_paywalled_content":false,"_jetpack_memberships_contains_paid_content":false,"footnotes":"","jetpack_publicize_message":"","jetpack_publicize_feature_enabled":true,"jetpack_social_post_already_shared":true,"jetpack_social_options":{"image_generator_settings":{"template":"highway","default_image_id":0,"font":"","enabled":false},"version":2}},"categories":[463],"tags":[1900,14,1819],"class_list":{"0":"post-34862","1":"post","2":"type-post","3":"status-publish","4":"format-standard","5":"has-post-thumbnail","7":"category-wordpress","8":"tag-child-theme","9":"tag-wordpress","10":"tag-wordpress-theme"},"aioseo_notices":[],"jetpack_publicize_connections":[],"jetpack_featured_media_url":"https:\/\/www.rumahweb.com\/journal\/wp-content\/uploads\/2022\/12\/Banner-Apa-itu-Child-Theme-dan-Cara-Membuatnya-di-WordPress.png","jetpack_shortlink":"https:\/\/wp.me\/p8n3G7-94i","jetpack_sharing_enabled":true,"_links":{"self":[{"href":"https:\/\/www.rumahweb.com\/journal\/wp-json\/wp\/v2\/posts\/34862","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.rumahweb.com\/journal\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.rumahweb.com\/journal\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.rumahweb.com\/journal\/wp-json\/wp\/v2\/users\/321"}],"replies":[{"embeddable":true,"href":"https:\/\/www.rumahweb.com\/journal\/wp-json\/wp\/v2\/comments?post=34862"}],"version-history":[{"count":0,"href":"https:\/\/www.rumahweb.com\/journal\/wp-json\/wp\/v2\/posts\/34862\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.rumahweb.com\/journal\/wp-json\/wp\/v2\/media\/35046"}],"wp:attachment":[{"href":"https:\/\/www.rumahweb.com\/journal\/wp-json\/wp\/v2\/media?parent=34862"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.rumahweb.com\/journal\/wp-json\/wp\/v2\/categories?post=34862"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.rumahweb.com\/journal\/wp-json\/wp\/v2\/tags?post=34862"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}