Modifying a php file in a theme using child theme
-
Hi all,
I purchased a commercial theme and would like to modify some of it’s .php files but I want to use child theme so my modifications won’t go away after theme update.
I have successfully created a child theme and .css modification is working following the guidelines of codex – child theme
As for the .php file I want to modify, it’s in the sub-folder of the parent theme (aviator/plugins/agencies/agencies.php)
My questions, in break-downs, are:
– Is it true that I need to create the same folder structure in the child theme folder so the WordPress engine knows and pick up the child theme’s .php instead of the parent’s?
– Is it true that if the theme uses twig, editing .php files of child theme is not supported?
– Is it true that I need to find where the .php file was first called, and then put the relevant .php files structurally to my child theme in order for the WordPress engine to pick up the target .php file I intend to edit? If yes, how to trace?
Cheers
Theme: realia from themeforest.com / byaviators.com
- The topic ‘Modifying a php file in a theme using child theme’ is closed to new replies.