WordPress Child Theme is essentially a tool that allows you to change the parameters and styles of the original theme, while keeping its codebase untouched. It is very useful, when you want to keep getting updates to the original theme, but also do not want to deal with the hassle of modifying it over and over after each update.
In order to create a WordPress Child Theme, you need to:
- Log into cPanel.
- Click File Manager.
- Open the public_html folder.
- Open wp-content folder.
- Open themes folder.
- Click +Folder.
- Name it current_theme-child, where current_theme is the name of the folder for the theme you intend to use as a basis.
- Open the new folder.
- Click +File.
- Name it style.css.
- Click on the new file.
- Click Edit.
- Paste this into it, replacing the green lines with the folder name of your original theme:
/* Theme Name: Current_Theme Child Theme URI: http://example.com/twentyfifteen-child/ Description: Current_Theme Child Theme Author: John Doe Author URI: http://example.com Template: Current_Theme Version: 1.0.0 License: GNU General Public License v2 or later License URI: http://www.gnu.org/licenses/gpl-2.0.html Tags: light, dark, two-columns, right-sidebar, responsive-layout, accessibility-ready Text Domain: current-theme-child */ @import url("../current-theme/style.css");
- Save the file.
- Activate your new Wordpress theme.
Now you can add styles to the style.css you created. They will be applied to the website, but the original theme files will remain untouched and the theme will receive updates.