Step Four: Activating Your Child Theme
Your child theme is now ready to be activated. Log in to your site’s administration panel, and go to Administration Panels > Appearance > Themes. Your child theme should be listed and ready for activation. If your WordPress installation is multi-site enabled, you may need to switch to your network administration panel to enable the theme from the Network Admin Themes Screen tab. You can then switch back to your site-specific WordPress administration panel to activate your child theme.
Note: You may need to re-save your menu (Appearance > Menus or Appearance > Customize > Menus) and theme options, including background and header images, after activating the child theme.
Additional Step: Changing Template Files
Your child theme can override any file in the parent theme. If you include a file of the same name in the child theme directory, it will override the equivalent file in the parent theme directory when your site loads. For instance, if you want to change the PHP code for the site header, you can include a header.php in your child theme’s directory, and that file will be used instead of the parent theme’s header.php.
You can also include files in the child theme that are not included in the parent theme.
Additional Step: Using functions.php
Unlike style.css, the functions.php of a child theme does not override its counterpart from the parent. It is loaded in addition to the parent’s functions.php file, right before the parent file loads.
The functions.php of a child theme provides a smart, trouble-free method of modifying the functionality of a parent theme. If you modify the parent theme’s functions.php file, your function will disappear the next time you update your theme.
If you add a functions.php file to your child theme and add your function to that file, the function will do the exact same job from there, with the advantage that future updates of the parent theme will not affect it. Do not copy the full content of functions.php of the parent theme into functions.php in the child theme.
The structure of functions.php is simple: An opening PHP tag at the top and your bits of PHP below. You can put as many or as few functions as you wish. The example below shows an elementary functions.php file that does one simple thing: adds a favicon link to the head element of HTML pages.
' . "\n";
add_action( 'wp_head', 'favicon_link' );