Tutorial by Examples

The child themes are meant to be a safe way to keep customizations of the main template without fearing to lose them on a theme update. Basically, whenever you want to edit a file inside the active template from your website you have to ask yourself "What is going to happen when I will update ...
A child theme is identified by WordPress when there is a directory (for example child-theme) inside /wp-content/themes/ with the following files: style.css This file must start with a comment template like this: /* Theme Name: Example Child Author: Me Author URI: https://example.com/ ...
The most common usage of a child theme is to override template parts. For example, a sidebar, if we have a theme with the following file at /themes/template/sidebar.php <?php /** * The sidebar containing the main widget area. * * @link https://developer.wordpress.org/themes/basics/templa...
Even if it is not a best practice, sometimes you need to replace assets like CSS or JS files or libraries. Note that the WordPress template overwriting system doesn't work with anything else than .php files, so when we talk about assets we refer to registered assets One example could be the replac...

Page 1 of 1