Build Your Own Business Website header image

Customize Next & Previous Posts Links – Part 2 – Editing the Text Using Thesis Filters

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.

This is the 2nd in an 8 part series that shows how to customize the Next Post/Previous Post links in Thesis. We start off by looking at the various places this shows up by default in the site and then look at the filters Thesis has for customizing them.

Video Transcript

And we’re just going to start right off with that. We are going to grab this function and copy it and then we’re going to open up… oh, we got the wrong version of NetBeans open. Oh well, it doesn’t matter. We’re going to use this version anyway. And then in that regard, I’m going to close up some of these pages.

Okay and then we’re going to go to the categories project and themes, thesis_18, custom, custom functions php. We’re going to come down here and we are going to add this function. Okay and we’re going to start right here. So I’m just going to paste that code there.

And so it says, “function next post text” and then what we’re going to do is we’re going to change that text. Now right now, it would change the text from next post colon and then the name Morello Cherry to whatever it says there which is Newer Post. Okay so we’ll start off with that. The way this works is it’s going to… it takes this filter, Thesis Next Post that we looked at a moment ago and it replaces the text with this function and in this case, it’s next text = newer post colon and then it’s going to return the next text. And so, let’s just go ahead and save that and see what it looks like.

Pam, would you mind typing in what it was you wanted it to look like? I’ve forgotten the terminology you wanted to use for that. Essentially for catalog items that you… that were placed in the catalog previously… previous to where we are right now.

And so, let’s open up our Filezilla also and we’ll open up categories and then themes, thesis_18, custom and then we’re going to upload that custom functions php. Go back over to the site and refresh it. And now you can see newer post with the title, Morello Cherry. So this used to say next post, now it says, newer post and it has the title.

And so, what Pam wants to see here is… well, just so you could see what would happen, that one had just been next post, right? So the next thing to do though instead here is… well let’s see, let’s just go ahead and wrap that up.

So now we come back over to the next post and we’re going to go back to our filters and we’re going to pick up the same thing for previous post. Okay, copy and then we got to do that again right there. So this is the previous post text and I just realized that the filter that we’re using right now… so just go ahead and roll back this conversation. That filter that we’re using would just change the text but it would not change the link and Jeb doesn’t want to see the link there at all. So this works just fine for the Community News website.

0 Comments… add one
0 comments… add one

Leave a Comment