How to track down the exact php files that contains specific html?
I have a wordpress site up and running and I like to play around with firebug or web developer (another firefox extension). Whenever I want to change something I can easily inspect that element and change it 开发者_开发技巧live in the browser, but consider that wordpress is a modular platform with hundreds of files. So, lets say I press on a element on the sidebar and I can see that the styles are from style.css file, but how to find out on what exact .php (or .html) this specific element is embedded? Thanks.
I think your best bet is to read the WordPress Theme Development Docs and familiarize yourself with how the different theme files work together to create a page. Once you know the basic mechanics, you'll know pretty much exactly which file to go to.
The php
files operate on server-side, firebug works on client-side so you won't be able to see ALL the php
files in use from firebug. On the other hand you can see javascript
, and css
files since they are accessible to the client in Firebug.
You can use your ftp
or ssh
client to access your server and take a look to the php
files, by browsing the directories.
"but how to find out on what exact .php (or .html) this specific element is embedded"
After much research I don't believe it can be done in Firebug - directly. What worked for me was to inspect an element, note something unique about it (or nearby), then use FileSeek to search the theme you are using. If you installed the theme direct from the web, just download a copy to your computer and use FileSeek to search it (the program will quickly search for text withing files - and is free).
Hope this helps.
精彩评论