You will hear this often and this is something that WordPress recommends; but if you plan to make custom changes to your theme, whether mine or from someone else, the best way is to use a child theme. You can read more about child themes here:
The reason for using a child theme is because if updates are available for your theme, in this case the parent theme of Preferential Lite, you won’t lose any custom changes because they were done in the child theme. How this works is that the child theme inherits the styles and functionality of the main theme (the Parent theme), so any updates that happen, it will inherit those. However, if you made any custom changes to the theme, these exist in the child theme and not the parent theme, which is why when you update, you don’t lose the changes.
When to Use a Child Theme
Easy guideline for you:
- If you plan to make custom changes to any theme files, either now or in the future, use a child theme.
- If you plan to “only” make changes to the stylesheet, then use a plugin for editing CSS (no child theme needed).
When making core theme file changes with a child theme, this is done by copying the file from the parent theme and uploading it to your child theme, while maintaining the same file structure as the parent theme. So for example, if you wanted to modify the header.php file in the parent theme, you copy that file and upload it to your child theme to the exact same location as the parent theme.
Note:The child theme duplicates the same structure and layout as the parent theme.
Install The Child Theme
Before you install the child theme, always make sure the parent theme is installed. It does not have to be activated, just installed, otherwise you will get an error.
- Download a copy of Preferential Lite to your desktop and unzip the package
- Go to Appearance >> Themes >> Add New >> Upload >> Choose File
- Locate the original downloaded (and unzipped) preferential-lite file
- Inside, select the file “preferential-lite-child.zip” (found in the “child-theme” folder” and click Install Now
- Activate the theme