• 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

Viewing 3 replies - 1 through 3 (of 3 total)
  • 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

    If the parent theme uses sub-folders, then yes – probably.

    Is it true that if the theme uses twig, editing .php files of child theme is not supported?

    No idea. we do not have access to commercial themes, so you will need to ask the theme developer about this.

    Thread Starter frankie.yuen

    (@frankieyuen)

    Thanks. I have asked them but they are obvious not the most efficient theme developer I have ever worked with…

    Sorry to hear that but we do not have access to commercial themes.

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Modifying a php file in a theme using child theme’ is closed to new replies.