
Note: The child theme’s functions.php
file is loaded in addition to the file of the same name in the parent theme. In fact, it is executed right before the parent theme’s function.php
— unlike style.css
, which replaces the original file. Consequently, do not copy the full contents of your parent theme’s functions.php
file to the file in your child theme. Rather, use the latter to modify functions in the parent theme.
Back to customizing our child theme. In this example, I want to add a widget area to the footer of the website. To do that, we first need to register a widget in our functions.php
file.
Note: The child theme’s functions.php
file is loaded in addition to the file of the same name in the parent theme. In fact, it is executed right before the parent theme’s function.php
— unlike style.css
, which replaces the original file. Consequently, do not copy the full contents of your parent theme’s functions.php
file to the file in your child theme. Rather, use the latter to modify functions in the parent theme
.Note: The child theme’s functions.php
file is loaded in addition to the file of the same name in the parent theme. In fact, it is executed right before the parent theme’s function.php
— unlike style.css
, which replaces the original file. Consequently, do not copy the full contents of your parent theme’s functions.php
file to the file in your child theme. Rather, use the latter to modify functions in the parent theme.