Is there a browser plugin or method to find which php template an item is coming from?
Leave a Reply
You must be logged in to post a comment.
Is there a browser plugin or method to find which php template an item is coming from?
You must be logged in to post a comment.
The Debug Bar together with the Debug-Bar-Extender will show you what template file is being used.
You could just add an HTML comment into each template file and then view source to see where the content you are trying to track down it is coming from.
the method I’ve been using is to find the item – such as a page title or whatever by using firebug extension for firefox. This will usually result in finding the related css class or id name for that item/element.
Then in dreamweaver I use the search function to find that class name from all of the files in the wordpress wp-content folder. Not sure of other programs like dreamweaver that have this search function but surely they exist.
I just wish there was a browser add on that would do for the php files what firebug does for css & html
The Query Monitor plugin is a very powerful tool for doing this. It shows the template and the queries and hooks the page generates; plus their load order, priority and whether it’s core, parent theme, child theme or plugin. Very handle to have in your toolbox!
In WP Cli:
On the repo: http://wordpress.org/plugins/query-monitor/