Build Your Own Business Website header image

The Beginner’s Guide to the Thesis 2.1 Skin Editor – Part 4 – Types of Templates in Thesis 2

Difficulty Level -

Filed Under Topics - ,

Listed Under Lesson Subjects -

Applies to -

Whoops, you've found some premium content!

Watch the opening clip of this video to preview it,
the full video is available to paid members.

Now that you understand the Thesis Skin Menu, we’re going to talk about the different types of templates in Thesis 2.1.

You noticed that when we clicked on this, that there are a number of core templates. These core templates with this plus sign also have dependent templates or child templates that are based on the parent template. So, these are the core templates that are generated by Thesis.

Then various skins come with custom templates and so Thesis Classic has this Landing Page Custom template. And then you have this Copy from Template function where you can copy the contents of one template over to another.

I see folks wrestle with templates and the idea of templates all the time so we are going to talk about Thesis 2.1 templates at length here before we quit for the first break.

2 Different Types of Templates

Thesis has two different types of templates, Core Templates and Custom Templates. Core Templates are automatically applied to their appropriate pages. So if you haven’t assigned a custom template to something, then it’s going to automatically get its core template.

Whereas Custom Templates are always manually applied by the user. So, if you create a custom template it’s never going to get used unless you go to a page, or a post, or category, or whatever and select that template for use.

Core Templates

Thesis 2.1 has these core parent templates, Home, Single, Page and Archive.

Single Template

The Single template has child templates. It automatically has an attachment template and then it’ll have one for every custom post type. Notice that in this site there is one called testimonial, that’s because on this site I created the custom post type called testimonial. So, Thesis automatically generated a template for that and that template is a child template of single.

The Single template is always applied to single posts or single custom post types. And the reason why it is called single is because once upon a time, there were only 3 templates. There was the Home template which showed all your posts, there was the Single template which showed a single post and then there was the Archive template that showed all posts of a given category. And Single there meant it was just displaying a single post whereas Home and Archive displayed a bunch of posts.

Page Template

The Page template has a couple of children automatically as well and the children of the Page template, the Front Page and the 404 Error Page.

Now the Page template only applies to pages. You can’t take a page template and make it apply to the home page. You can’t make it apply to the front page. You can’t make it apply to a single post. If you want to take the page style and apply it to a single post you have to create a custom template from that page template and then you can apply the custom template to the single post. But the page template, otherwise only applies to pages.

If you’re using a static front page, the template that is always applied to a static front page is the Front template. It’s never going to use the home template. It’s never going to use the page template. It’s always going to use the Front template. And I’ve had people say, well how do I apply a custom template to my front page? Well you don’t apply a custom template to your front page you simply style your Front template.

The Front template is used no place else besides the front page. So it doesn’t need a custom template it’s only got one and it’s only used once. So, when you’re styling your static front page that’s the template to use and if you don’t have a static front page then that template…well, it probably still exists but doesn’t do anything because it only does something in the case of a static front page. Your 404 Error template also applies to your 404 page.

Home Template

The Home template is always only used on your posts page whatever page that happens to be. People wrestle with this, but it doesn’t really matter what you’ve specified as your posts page. Whether it is your actual home page or it is some other page on your site, the template that only applies to it is the Home template.

That home template is never going to apply anywhere else. If you were around on Wednesday you saw I was trying to troubleshoot a site where the home template was applied to two different pages which broke the whole thing. The home template can never be applied to any page other than the posts page.

Archive Template

Next up, you have probably the most confusing of templates and that’s the Archive template. The reason it is confusing is because of the terminology. In WordPress, archive does not mean some place where you store content that you don’t need any more. In WordPress, Archive means a collection of posts that share a common characteristic.

So your category pages are archive pages. Your tag pages are archive pages. You can also have custom post type archives, custom taxonomy archives, and date and author archives. If you are using the WordPress search widget then search results is an archive page. All of these things are archive pages and use the archive template.

This is also one of those things that people misunderstand fairly routinely and that is WordPress’ ability to group content by shared characteristics and then display it. And I don’t think a week goes by that I don’t have to explain this to someone. They’ll be working away and they say “well how do I create a page that displays all of these posts?”.

A couple of weeks ago, someone actually physically had created a table. And was physically creating what look like post teasers where they were putting in a picture from the post in one part of the table and the headline of the post on another part of the table and then some excerpt from the post in another part of the table. And then they physically went through the page and created this thing that showed essentially some recent post with link to the actual post.

What they didn’t understand was that WordPress automatically does that. That is what the Archive templates are, Archive pages are automatically a grouping of posts by some kind of shared characteristic. And it’s not just posts, it can be any kind of custom post type.

So, that is something to keep in mind any time you are displaying a grouping of posts by a shared characteristic you are looking at an archive page and an archive template. And if you aren’t looking at that then you probably aren’t doing it right. So, if you have to do something extra to display a group of posts on a page then that’s the point in which you want to ask yourself well, what am I doing wrong here? Maybe there is a WordPress way to do this, okay?

0 Comments… add one
0 comments… add one

Leave a Comment