Is there a browser plugin or method to find which php template an item is coming from?

Is there a browser plugin or method to find which php template an item is coming from?

Related posts

Leave a Reply

4 comments

  1. 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.

  2. 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

  3. 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:

    wp plugin install query-monitor --activate
    

    On the repo: http://wordpress.org/plugins/query-monitor/