Forums

The forums ran from 2008-2020 and are now closed and viewable here as an archive.

Home Forums Back End how to use php files on WordPress child themes Reply To: how to use php files on WordPress child themes

#190364
LewisCowles1986
Participant

Wow, in the odd chance you still need to know this, or someone else needs to know and nobody has answered, you should check out these links

WordPress Codex on Child Themes – Using functions.php
How to modify the parent theme behaviour within the child theme

Basically you may not be able to do this depending upon your theme, in which case it may be easier to manually import functionality using require_once. This may be a lot more difficult as often commercial or freemium theme builders have no concept of separation of concerns, and may have limited widgets to working within their framework. In this case it may be more efficient to drop the project, but with awesome tools like netbeans you can find where variables, defines and functions are created by opening as a project, and then take the arduous journey of re-creating a compatible environment for the theme features you need. (i.e. defining necesarry constants, compatible objects etc)

9/10 it’s not worth it, components should not be bundled like this with the theme unless they do not want you using them…