How to customize Docy Child Theme
Why you should use the Docy child theme:
Safeguarding Customizations during Updates:
In the absence of the Docy child theme, any modifications made directly to the theme’s core files might be overwritten when updates are applied. By utilizing the Docy child theme, you establish a protective layer that ensures your customizations remain unaffected, even when the main theme undergoes updates.
Enhancing Code Maintainability:
Opting for the Docy child theme allows you to keep your custom code separate from the original theme. This separation streamlines the management and troubleshooting of your modifications, offering a structured approach to maintaining and organizing customizations. The result is improved code maintainability and a more straightforward process for updating.
Protecting Your Customizations with Docy Child Theme
It is crucial to apply modifications through the customization process to safeguard the Docy theme customizations and retain them seamlessly following theme updates. This guide will take you through the necessary steps.
Install the Docy Child Theme:
- Locate the `docy-child.zip` file within the theme package.
- Upload it through the WordPress admin panel Theme Options Appearance Themes Add New Upload Theme
- Alternatively, use an FTP client to upload the unzipped folder to `wp-content/themes/`.
IMPORTANT: Install the child theme before importing demo data to prevent customizations from being overwritten.
Using the Child Theme
- Add modified functions from the parent theme’s `functions.php` to the child theme’s `functions.php` file.
- Register new functions within the child theme’s `functions.php` as needed.
Override Template Files
- Copy any template files you wish to modify from the parent theme into the child theme, maintaining the original folder structure.
- Edit these files directly within the child theme folder.
Excluded Folders: Do not copy files from these folders:
If modifying a function within an excluded folder, copy only the required function to the child theme’s `functions.php` and register it there.
- Always prioritize child theme customizations to ensure seamless updates and prevent loss of changes.
- Maintain the original file paths when copying files to ensure proper functionality.
- Use clear and concise comments within your code to enhance readability and maintainability.
- Refer to the Docy theme documentation for further guidance on specific customization options.