Build Your Own Business Website header image

Community Library Website Case Study – Part 22, Create the Permalink Structure

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 twenty second in a series of live lessons on using WordPress and Thesis as a Content Management System (CMS). In this lesson we change the permalink structure from the tradition style to a custom structure which allows for semantic URLs (they can be easily read and understood). We make this change because it makes for a better URL structure from the standpoint of SEO. And we install and activate the Custom Post Permalinks plugin to resolve a problem the URL structure is having with the custom post types.

A note about Permalink structure in WordPress 3.3. It is no longer necessary to include a number in your permalink structure if you are starting a new website with WordPress 3.3.

Video Transcript

Rick: So shoot, I forgot what number we’re on. Anyway, we’re going to talk about the permalinks now for our Community Library Website project and if you go to the site at the moment, you can see there has a very traditional type of permalink structure. That is, it has the query question mark and then it has… the question is what kind of media type is it? And the answer is book. And if we select a book, the question is which catalog item is it? And the answer is 131 Christians Every One Should Know.

And so, that is actually crummy SEO from a… or crummy URLs from an SEO standpoint, right? You want nice semantic URLs that can be easily read and understood. And it’s even worse really… say, if we go to our blog post you know, here’s our first blog post. Community Library Case Study and the question is what do you want to read? And the answer is p=175 which means absolutely nothing, right?

And so, this is what we’re going to fix. Actually, when we’re done fixing this, this is the other thing we’re going to fix. You can see that we have listed our topics, audience, all this kind of stuff attached to our regular post which of course, we don’t want.

Okay so anyway, let’s go back to our dashboard and the first thing to do here is to just go to our permalinks settings and set up our standard permalinks. Now, if you’ve been paying much attention to me for the last several months, you know that this is my recommended standard permalink structure. So I select month and name first and then from there, I select custom structure. Take month num out of this and paste it over year. So we start with the month number and then we type in category here and then leave post name. And then what this will do is it places a date number at the beginning which is necessary in order for WordPress to be able to process this stuff well. So we put month number at the beginning then we put our category in the middle and then our post name last. We hit save changes and we go back over to our site.

Now you can see the URL is 04 uncategorized… I mean, obviously, we should add a category for this and then the Community Library Website. This is very similar to what happens on my site, right? Here’s byobwebsite and then video tutorials and then customize thesis like a pro. If we come down here to the 1st lesson, we’ve got Video Tutorials, Customize Thesis Like a Pro, Manage the File Structure. And then if we look at the 1st video, now we get to the month number, Video Tutorials, Customize Thesis Like a Pro, Managing the File Structure, the default WordPress and Thesis structure.

So this is a semantic URL and that’s what you’ve got going on here. And that’s what will happen…I mean, it’s exactly the same setting that produces this URL. Okay but if we look at our catalog, we still end up with question post type = catalog items and if we go to books, we still end up with… well actually, that’s not too bad. Oh actually, we even get failure there. Look at that. We even get failure in our… I didn’t think that would happen but you can see that when we select our library items here, it fails because these URLs don’t actually resolve properly or this URL structure doesn’t actually resolve properly to our custom post types. So it’s even worse than I thought.

Okay but anyway, we go to our dashboard. We’re going to use a plugin to do this and the plugin is going to be Custom Permalinks, I believe is the name of it. So let’s go down to plugins and we hit Add New. We’re going to install Custom Permalinks… yeah, Custom Post Permalinks. That’s what it is and this is the same plugin that we installed on the Community News Website. Okay yeah, we’re going to install this plugin. We’re going to activate the plugin and then we’ll come back down here to permalinks and we’ll employ it.

Now, what I want to accomplish here is I want the name of the website and then I want it to say for our custom post type catalog items, I want it to say catalog items and then the media type and then the name of the catalog item. So what we’re going to do then is we’re going to come down here and we’re going to make it say that in this section here. And the first thing we’re going to do is capture month num. Let’s see, we’re going to put that right here. So we get our month num in first and then we are going to use a post type which is what’s going to say catalog items for us. So we’ll grab post type and we’ll put that in there. It’s just month num and post type so it’s going to say 04 catalog items and now what we want is the media type. And what this says is that you can use any of the… let’s see, where did it say that? Okay for example, if you have a taxonomy called foo_bar, the tag would be foo_bar like that. So you can add a tag for any taxonomy registered for the post type.

And so, media type is the tag that we have registered for this so we’ll say %media-type. Now it’s again absolutely essential that you use exactly the same thing as you did when you created this taxonomy. So before we save this, if we come down to custom post types and look at manage taxonomies, you can see under media type, that’s what we called it, media-type. So that’s what it has to be called here, media-type. So you got month num, post type which is going to say catalog items, media type which will say book, DVD, audio book, something else. You have catalog items which is the name of this post type.

Ultimately, if we do book reviews, it will be the same kind of thing. This review here is the name of the review or the title of the review. This catalog items is the title of the catalog item so okay, let’s go ahead and save that. And then let’s go back to our site, let’s go to our catalogs for books. Now it says media type book. If we go to one of our books, now it says 01 for the month number, catalog items book, 131 Christians Every One Should Know. If we go to the adult audience, it’ll say audience adult and if we pick a different book, there’s the month number, catalog items book, Jesus In His Own Words.

If we instead look at DVDs, Madame Blueberry, this is catalog items DVD Madame Blueberry.

So Pam, I’m going to unmute your microphone here. Do you like the way this URL structure works?

Pam: Yes, I like this very much. Thanks, that’s very helpful to learn about that plugin.

Rick: Yeah, you know, especially for SEO, it’s really, I think, important to be able to have this kind of thing. In the first place, somebody searching for the Madame Blueberry DVD might find this page because of this URL. So okay, well that wraps up the URL part of it. It’s actually a lot easier than I was really expecting it to be.

0 Comments… add one

Save $200 on Membership Now!

Start learning today for as little as
$0.82 PER DAY!
THIS IS A LIMITED TIME OFFER!
Subscription Options
0 comments… add one

Leave a Comment