To customize a theme , it is not always easy to trace every files that are used and find out which one do what . For example i' like to find out how my menu is generated so i can add some conditions to it , and also change the display. Is there a way to find out all the files loaded ? which header is used ...etc... maybe put a bit of code somewhere in the autoload sytem? or using firebug?


WordPress does not really track what theme files are loaded beyond some basic things (for example $template global holds main template file).

You can use PHP's native get_included_files() to list all PHP source files loaded during request and narrow it down to your theme. Note that for more complex themes this will have not only templates, but likely a lot of framework files as well.


There Is no method known to me.
I would suggest you to set yourself apart with the file hierarchy and to learn bit by bit where the functions are written.

And use the codex to search for functions.
It can give you information about the file in which your desired function is included.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.