Child Theme - Anpsthemes

Child Theme

Child theme allows you to modify and add to the functionality of that parent theme without modifying it directly. The parent remains intact, everything is built within the child theme.

Reasons to use child theme:

  • Easy updates – If you’re using a child theme, you don’t have to worry about updating the parent theme, as all your changes will still be available inside the child theme.
  • Changes – If you’re using a child theme, every modification can be found in the child theme’s folder and thus you can track all the changes you made very easily.

How to modify the parent template files

If you want to modify template files like header.php, page.php, etc., copy and place the entire file inside the child theme and make your modifications inside the child theme file.

Template files are files that are included using the WordPress API. Files like helpers.php are not template files and do not allow you to place the entire file inside the child theme to modify it.

How to modify functions

If you want to modify a certain theme function (eg. anps_page_title), then copy the entire function inside the child theme’s functions.php. Note that this works only for theme functions that are wrapped using the function_exists if statement. We tried including as many functions as possible.