Theme Version 2 – Override the parent theme to the child theme

The developer documentation assumes you have knowledge and coding skills. While we created these docs to help you achieve things not available in the original features, we do not provide support if something doesn’t work when referencing the developer documentation. If the example code doesn’t work for you, please debug it yourself or hire a freelancer to help with debugging.

All customizations will be lost when you update our theme/plugin to a new version in the future. To avoid this, you must use filters and actions: https://developer.wordpress.org/plugins/hooks/.

In this tutorial, I will try to override the gdlr-page-item.php in: \wp-content\themes\totalbusiness\include\function\gdlr-page-item.php from the Total Business theme into the child theme.

In the child theme, copy the file in the path: totalbusiness-child\include\function\gdlr-page-item.php. (create the folder that’s not available in your child theme)

In the functions.php in the child theme, add a line of code:

include_once(get_stylesheet_directory() . '/include/function/gdlr-page-item.php');

Try to make any change in the totalbusiness-child\include\function\gdlr-page-item.php and check it again.