This is the last part to our How to Upgrade from Thesis 1.x to Thesis to Using the Thesis Classic skin. We’ve got our landing page template set up, we’ve got our page template set up, we’ve got our front page template setup. There are more templates obviously to be set up than this but I think I’m going to show you one more, the home page template.
Changes to Make on the Home Page Template
If we come on over to HTML and we select our home template which is our blog posts page and our Header Area, notice it does not have the Nav Menu on the right spot, it does not have the Header Widget in the right spot so we’ll drag those up into place.
In the footer area, we’ve got Footer 4, 3, 2, 1, 4, 3, 2, 1, drag it into Footer Area Page then drag 4 into 4, 3 into 3, 2 into 2 and 1 into 1. Hit save template, we’re getting pretty close however, we are missing a couple of things.
Edit the Content Area
One of them is that we have some posts that are showing up here that we don’t want to show and we have other posts that aren’t showing your images. We’re going to come over to our Content Area and look at our home post box, Headline Area. It’s got a byline of author, date and edit link, I don’t want the edit link in there. Why can’t I get rid of this thing? Because I have to show it in the tray. Crazy. Well, drag it over there for the time being.
It should be able to just drop it into the tray here but I don’t want to move content over there for heaven sakes. What I wanted to move was the edit so I’ve got content there then what I need is the Thesis post image and I had the Thesis post image I believe below the headline and above the content. Let’s save that template now and refresh this, that’s what it’s supposed to look like.
Removing Product Posts from the Home Page
There are some things like this Products that I didn’t actually want showing up on the home page at all so I was excluding product posts. If we look at our PHP, I had this custom query here, if(is_home) then what I did was I just removed categories 5, 6, 8, 9. Now, what I’m really going to do though is improve this. Okay let’s see, “Removes a product posts from the home page” and we’re going to use what’s called the pre-get_posts filter.
In fact, we’re essentially going to steal this code right there and we’ll steal it all the way to there. That’s right, so it was that query then cat is minus all those. So if(is_home) and if it’s the main query, then set the query to exclude categories 5, 6, 8 and 9.
Use the pre-get_posts filter, home_page_custom_query, save that document, upload it, come back over here and test it and now we’re going to see these things aren’t there anymore. Now, only the posts are there and none of the rest of the product post are not there.