Using Chrome you can right click - Inspect element to see the html code behind that element:
I wonder how to find which php file has generated that html. Maybe there is some tool to put a breakpoint into the html so the php server will stop when trying to generate it again?
I'm using WordPress locally. I'm on Ubuntu 14.04LMS. I'm using Sublime Text 3 with XDebug.
UPDATE 1
A WordPress plugin able to put, in every file, something like the following would be a good solution (I think from my beginner's viewpoint):
echo '<!-- name_of_the_php_file.php -->';
8 Answers. Show activity on this post. If you are using PHP as an Apache module then phpinfo() will tell you the php version used, and the php config files, NOT the php path. If you have 2 versions of the php executable then this will help you.
Simple way: Use file_get_contents() : $page = file_get_contents('http://stackoverflow.com/questions/ask');
Whether you're searching for a word, an entire phrase, or a piece of code, this plugin will be able to find it. All you have to do is navigate to Tools -> String Locator and start searching. The plugin will then scan through all the theme and plugin files you have installed, and it will find the search term.
However, what I can suggest is installing WP Query Monitor plugin, and activate it. Then, visit the page that you will have your clients visit and check in the WP Query Monitor Debug Bar what “template” is used. That will indicate the PHP file (possibly within the plugin) that is used to display this content.
Use this plugin "what the file" to find out the php file. Then rest it is to find out a function or something else by CTRL + F in any editor.
I want to add one more plugin which is not exactly for this purpose but it is very popular among WordPress developers and it solves this problem very well. The plugin is Query Monitor.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With