{"flag":true,"single":true,"pageTitle":"How to create Child theme","post":{"id":313,"user_id":"1","slug":"how-to-create-child-theme-hkcx","title":"How to create Child theme","body":"<p><strong>why child theme is needed?<br><\/strong>A child theme is like a protective layer built on top of your main (parent) theme.<br>It inherits everything from the parent layout, styles, functions&nbsp; but lets you safely customize parts of it.<strong><br><\/strong><\/p>\r\n<p>If you edit files directly in your parent theme (like style.css, header.php, or functions.php), everything works fine until the theme updates.<\/p>\r\n<p>on update: ???? All your customizations are lost, because the update replaces the old theme files.<\/p>\r\n<p>Child theme<br><strong>1. Safe Updates<\/strong>&nbsp; &nbsp; your custom CSS, PHP, and templates stay intact.<br><strong>2. Clean Separation <\/strong>&nbsp; &nbsp;All your modifications live in the child theme, making it easier to debug, backup, or migrate.<br><strong>3. Easy Customization &nbsp;<\/strong> &nbsp;You can override only the files you need &mdash; e.g., just header.php or single.php.<br><strong>4. Reuse or Revert Anytime<\/strong> &nbsp; &nbsp;If something breaks, just switch back to the parent theme.<br><strong>5. Extend Without Mess<\/strong> &nbsp; &nbsp;Add new PHP functions, scripts, and styles without touching the parent.<\/p>\r\n<p>&nbsp;<\/p>\r\n<p><strong>1. <\/strong>Locate Your Current Theme <strong>\/wp-content\/themes\/ ie its astra<\/strong><\/p>\r\n<p><strong>2. <\/strong>Create a New Folder for the Child Theme&nbsp;<\/p>\r\n<pre class=\"language-markup\"><code>\/wp-content\/themes\/astra-child\/<\/code><\/pre>\r\n<p>3. Add style.css<\/p>\r\n<pre class=\"language-markup\"><code>\/*\r\nTheme Name: Astra Child\r\nTheme URI: https:\/\/example.com\r\nDescription: Child theme for Astra\r\nAuthor: Your Name\r\nTemplate: astra\r\nVersion: 1.0.0\r\n*\/\r\n<\/code><\/pre>\r\n<p>Paste <strong>screenshot.jpg<\/strong> inside \/wp-content\/themes\/astra-child\/ to give it thumbnail<br><br><\/p>\r\n<p>Navigate to Appearance &rarr; Themes. and activate child theme<\/p>","category_id":"29","is_private":"0","created_at":"2025-10-08T22:50:09.000000Z","updated_at":"2025-10-08T22:52:11.000000Z","category":{"id":29,"user_id":"1","name":"Wordpress","slug":"wordpress-uzoa","parent_id":"1","created_at":"2023-11-10T02:49:29.000000Z","updated_at":"2023-11-10T02:49:29.000000Z"},"user":{"id":1,"name":"R GONDAL","email":"rizikmw@gmail.com","email_verified_at":null,"two_factor_confirmed_at":null,"current_team_id":"1","profile_photo_path":null,"created_at":"2023-03-12T10:49:33.000000Z","updated_at":"2025-01-10T12:59:00.000000Z","profile_photo_url":"https:\/\/ui-avatars.com\/api\/?name=R+G&color=7F9CF5&background=EBF4FF"}},"pageDesc":"why child theme is needed?A child theme is like a protective layer built on top of your main (parent) theme.It inherits everything from the  - How to create Child theme (Updated: October 8, 2025) - Read more about How to create Child theme at my programming site [SITE]","categories":[]}