How to View the Template Files in a WordPress Theme
A WordPress theme, is actually a group of templates that makes up the theme. A WordPress template, is only one of the theme’s template files that contains WordPress template tags. WordPress template tags make all the templates work together as a theme.
To view the templates that make up a WordPress theme and where you find them, both on your server and within your WordPress Dashboard follow these steps:
Connect to your Web server via FTP and look at the existing WordPress themes on your server in the folder /wp-content/themes.
When you open this folder, you find the /twentyten theme folder.
If a theme is uploaded to any folder other than /wp-content/themes, it won’t work.
Open the folder for the Twenty Ten theme (/wp-content/themes/twentyten) and look at the template files inside.
When you open the Twenty Ten theme folder, you see several files. At a minimum, you find these five templates in the default theme:
Stylesheet (style.css)
Header template (header.php)
Main Index (index.php)
Sidebar template (sidebar.php)
Footer template (footer.php)
These files are the main WordPress template files. Take a peek inside these files and see the different template functions they contain. These filenames are the same in every WordPress theme.
In your WordPress Dashboard, choose Appearance→Editor to look at the template files within a theme.
The Edit Themes page appears and lists the various templates available within the active theme. A text box in the center of the screen displays the contents of each template, and this box is also where you can edit the template file(s).
To view and edit a template file, click the template name in the list on the right side of the page.
A list of templates available in the default Twenty Ten WordPress theme
The Edit Themes page also shows the template tags within the template file. These tags make all the magic happen in your site; they connect all the templates to form a theme.
Below the text box on the Edit Themes page is the Documentation drop-down list for every file you edit, except style.css. Click the arrow on the right side of the menu, and a list drops down that contains all the template tags used in the template you’re currently viewing. This list is helpful when you edit templates, and it gives you some insight into the different template tags used to create functions and features within your WordPress theme.









