It this video we have a rather rambling discussion of how to use custom sidebars and custom templates to change up the page layout within a site. We also discuss the impact of making changes to an existing site and look at resources for learning how to do the various customization tasks.
Rick: Okay so next, we’re going to talk to Melanie. Melanie, I’ve just unmuted your microphone. How are you doing?
Melanie: I’m doing good, how are you?
Rick: I’m doing great. Okay so you asked about the best approach for changing the layout of pages on an existing site. What do you mean by that?
Melanie: Well, the site’s already been built and it was built with the 3-column layout: the content with the 2 right sidebars. And so now, what I’d like to do is leave the homepage the way it is. Have all inside pages one sidebar. So regular pages sidebar 1, the blog page, sidebar 2.
Rick: Yeah and so that’s not… that’s definitely not a beginning question because the way you would do that would be to… well, you have a couple of options. One of the options is to use custom templates. Well first, a step back for just a second. Is the front page or is the homepage a static front page?
Melanie: It is.
Rick: Or is it a blog page?
Melanie: No, it’s a static page.
Rick: Okay so then you would develop a custom template for your homepage that had both sidebars like that. Or 2 sidebars… I usually, for a homepage like that, I usually create homepage sidebars and have them you know, entirely separate from sidebar 1 and sidebar 2. And then you can… you know, I would probably create another sidebar called a page sidebar as your 3rd sidebar and then use the single sidebar as your standard layout and use that for your blog page and your blog posts. And then have a custom template for your pages and a custom template for your homepage and those would use different sidebars. Now I have… there’s lots of stuff on the site here about how to create custom templates but that’s what’s going to take in order for you to do that specifically.
Now an alternative to that…well, another alternative would be to have… to use the sidebar 1 on all pages except your homepage and then use a plugin like widgets display or display widgets, I guess. A plugin like display widgets that will… where you can say which pages you want any given widget on. And then you could still use sidebar one for both pages and posts but you would have you know, one text widget would only go on pages and you would use display widgets to set that. And another widget might only go on posts and you would again use display widgets to set that. You’d still end up needing to create a custom template for your homepage though in order for you to have the 2-column layout on the homepage.
Rick: Now if you want to… so I guess, have you looked at the Customizing Thesis Like a Pro videos yet?
Melanie: I’m sorry, say that again?
Rick: Have you looked at the Customizing Thesis Like a Pro videos?
Melanie: You’re saying about the ones that you did?
Melanie: I’m not exactly sure. The 2 that I’ve watched is on a post you did called Hooks, Widgets, and Templates and then the other one was How to Create User Selectable Custom Templates in Thesis.
Rick: Okay. Well actually, that one in particular should… the User Selectable Templates tutorial should show you how to create individual sidebars for the various templates and then it gives you the ability to select which template goes for which page. Now that’s going to affect the blog page or the blog posts. That’s only going to affect your other pages, your homepage and your other pages. So you would set your site up as a one-column or 2-column layout and you would use that automatically for your blog post and your blog page. And then for your static pages, you would use those custom templates. And if you have… if for some reason or another, that isn’t working for you, that tutorial that you mentioned, that User Selectable Custom Templates.. if for some reason, that isn’t working for you, we can either take it up in Wednesday session and you know, kind of walk through it or you can post a follow up question on the forum and then we can walk through it there. But that is… it is not a beginner’s question.
Rick: Okay? And you know, I certainly would suggest that you look at the Customize Thesis Like a Pro tutorials. I’ll show you what I mean by that.
Rick: So if you log in to your dashboard and look at intermediate tutorials then Customize Thesis Like a Pro is right here. And so, this is going to get you started and then over here at the side, you can see some stuff about… well, Thesis sidebars, Thesis php. And actually, if you search for custom templates you know, there are some tutorials on how to create a 3-column custom template which is essentially what you’re talking about actually. This one would work really well for your homepage. And because it takes a 2-column layout and makes it 3-column template and then there’s you know, you might start off with this, How to Create a Simple Custom Template in Thesis. And then you can just see that there are you know, I have lots of video tutorials on how to use custom templates. In fact, another way to look for those might be under the big Topics list. And so under Customizing Thesis, you might look under…
Melanie: There’s Custom Templates.
Rick: Yes, custom templates. Right. You can see how many videos I have on creating them, troubleshooting them you know, that kind of stuff. There’s quite a few videos on it.
Melanie: Okay. Since the site already exists with many pages, if I were to change the layout under Site Design, do I instantly kill all the material? Because I know it goes to one sidebar, whether there’s a sidebar 1 or sidebar 2, I don’t know.
Rick: Well, it will all go to sidebar 1. However, all the stuff in sidebar 2 still stays there. It just doesn’t show up on the page anymore. So for example, if you are…
Melanie: Well, that’s why you’re saying to build a custom template for the homepage and just leave one sidebar on all the other pages.
Rick: Right. And then you can take your sidebar 2… the widgets that are already in sidebar 2, you can take them out and drag them to a different sidebar, right? So you’re not going to actually lose those widgets. All you’ll do is the sidebar 2 just won’t show up on pages anymore but the… it will actually still sit there with widgets.
Melanie: That’s part of where my confusion was coming from. I understand that if I can plan the site from the beginning, I would approach it completely differently.
Rick: Well but… at this point… I mean really, it’s not that complicated to create a custom template for your homepage and then to either use display widgets to decide which widget goes… shows up on pages and which ones show up on posts or instead to create additional sidebars to go in custom templates. Actually you know, it’s not really that hard to do. You know, the User Selectable tutorial makes it more complicated because it assumes you have a bunch of different templates and a bunch of different sidebars and you want to make that choice. But if you’re just going to have one sidebar for pages, one sidebar for posts and then your homepage sidebars, you don’t need the complexity of the user selectable templates because user’s not going to pick a sidebar. The user’s going to pick a page then it would automatically have that sidebar at.
Melanie: Okay. So what I need is a custom homepage template and then display widget and then change the theme layout to be 2-column, 1 content, 1 sidebar. And then use display widget to say which sidebar appears on which pages.
Rick: That’s correct.
Rick: And if you… I do have videos on how to use display widgets. Again, I think that’s going to be in a basic tutorial and under Using Plugins. And then display widgets. So I have a couple of videos on how to use display widgets.
Melanie: Okay. But you said when you change the layout, sidebars stay there. I’m not blowing away sidebars, I just can’t.
Rick: Now, you’re not blowing away the sidebars. They will both sit right there in that widgets dialogue right, and you’ll see them… let’s see… where is Appearance and Widgets? You’ll see them both sitting here. If sidebar 2 had widgets in it, they’ll still be there.
Melanie: Okay and then I can just move them over to sidebar 1 or to a new sidebar I create?
Rick: That’s correct. And if you don’t want to lose them, don’t drag them to this box here because if you drag them to this box, they lose all their information. Drag them down to this box here and when you do that, they retain the information that you created. So for example, if you… you know, in this case where I’ve got all this stuff set for this tag cloud, if I drag it over here, it would lose all that information. But if I drag it down to here, it will keep it all so I don’t have to reset it when I want to reuse it.
Melanie: But I don’t have to do that. It will stay in the box called sidebar 2 even if you…
Rick: It will, yes. Yes, absolutely.
Melanie: Okay, great.
Rick: Okay? Great.
Melanie: Thanks very much.
Rick: You’re welcome. Good luck.