Always use a child theme to customise WordPress. This guide shows how to create one, override templates, and add custom functionality safely.

Abdur Razzak
Full-Stack Web Developer
Editing a parent theme directly means your changes are wiped out when the theme updates. A child theme inherits all the parent theme styles and templates but lets you override them safely. Your customisations survive every parent theme update.
Create a new folder in wp-content/themes/ with a style.css containing Theme Name and Template headers. In functions.php, enqueue the parent theme stylesheet using wp_enqueue_style with the parent theme handle as a dependency.
To override a template, copy it from the parent theme to the same relative path in your child theme. WordPress always loads child theme templates first. For example, copy single.php to customise single post layouts.
Add all custom hooks, filters, and shortcodes in the child theme functions.php. Consider splitting large amounts of code into separate files included from functions.php to keep it organised. Never modify the parent theme functions.php.