Create a New Folder: Start by creating a new folder on your computer and give it a name that identifies it as the child theme. For example, you can use the name of the parent theme followed by "-child" (e.g., "parent-theme-child").
Create a Stylesheet File: Inside the child theme folder, create a new file and name it "style.css". This file will serve as the main stylesheet for your child theme.
Add Stylesheet Header: Open the "style.css" file and add the following header at the top, adjusting the details as needed:
yaml
Copy code
/*
Theme Name: Child Theme Name
Theme URI: [URL of the parent theme]
Description: Child theme for [Parent Theme Name]
Author: [Your Name]
Author URI: [Your Website]
Template: [Parent Theme Directory Name]
Version: 1.0
*/
Make sure to replace the placeholder values with the appropriate information, including the name, description, author details, and the directory name of the parent theme.
Enqueue the Parent Theme Stylesheet: In the "style.css" file, add the following code to enqueue the parent theme's stylesheet:
arduino
Copy code
/* Theme Name: Child Theme Name */
/* ... other header information ... */
/* Enqueue Parent Theme Stylesheet */
@import url('../parent-theme/style.css');
Replace "parent-theme" with the actual directory name of the parent theme.
Save and Upload: Save the "style.css" file in the child theme folder and compress the entire folder into a ZIP file.
Install and Activate: Log in to your WordPress dashboard and navigate to "Appearance" -> "Themes." Click on the "Add New" button, then select the "Upload Theme" option. Choose the ZIP file you created in the previous step and click "Install Now." Once installed, activate the child theme.