Trying to customize Twenty Elevent theme it would be super useful for me as a beginner to see which templates rendered which pages / parts of the pages. Is there a plugin or manual way to achieve that? The easiest thing that comes to mind would be to add HTML comments to each and every template file but maybe some plugin / procedure automates this task already?
|
Here is something i use when developing themes:
Once you paste that in your theme's functions.php file it will print out an HTML comment at the footer with the theme file's name. |
||||
|
|
You can enable debugging and install the debug bar, it won't tell you which specific areas of a template are used , but there is a lot of useful data including which actual template page is being called. In wp-config.php
http://wordpress.org/extend/plugins/debug-bar/
|
|||||||||||
|
|
Have you tried using firebug? Maybe also checkout: http://yoast.com/wordpress-theme-anatomy/ |
|||
|
|
This doesn't specifically answer your question... but... If you're jumping into theme / plugin development I'd highly recommend Digging Into WordPress by Chris Coyier & Jeff Starr. There's a really great chapter named "Understanding Theme Files" that breaks down and explains what these files are used for, and how to get the most out of best practices. I don't have any affiliation with them, except that their book really jumpstarted my ability to build themes and plugins. It's one of those rare books that is super easy to follow as a beginner but also remains very useful as an experienced developer. |
|||
|
|


header.php), where did sidebar come from etc. If I'm correct the "template" in Wordpress usually means only the single resulting file likepage.php,single.phpor404.phpbut those files are usually composed from many more *.php files, e.g. Twenty Eleven has about 20 of them likecontent-page.php,tag.phpand I'd like to visualize how those work together to build the resulting page. – Borek Feb 20 '12 at 10:44