Although we have a lot of available predefined themes, both free and paid, often advanced users may wish to make some modifications. Sometimes it comes to small changes, adding new styles, color change, but sometimes change is required serious concern new features. Modification of the original theme is not a good idea. Most of the better themes will be regularly updated by the authors, if only to take advantage of the new version of WordPress, or patch any bugs and vulnerabilities. If the new version will include changes to the files that we modify our extras disappear, because the files will be replaced by those from the newer version.
To avoid such problems and allow users to safely develop themes we have a special mechanism to create a child themes. It is almost always sufficient for such purposes. If the original theme was well written, in accordance with art and recommendations of the WordPress Codex, we should not encounter any major problems.
How to create a child theme
Create the new directory with the the name of the child theme in wp-content/themes/directory and add the style.css file. In the style.css file put the following code:
Theme Name: Name of theme
Text Domain: nameoftemplate-child
/* CSS */
/* put the CSS below */
If you do not want to useimport to load the CSS from the base theme, we can use another method. To do this, create a functions.php file and then add in the following code:
, get_template_directory_uri() .
Image source: featured image