In the WPCandy v4 redesign post I mentioned that my favorite part about the new website is that URLs as sentences adorn the site.
Today I’m going to show you how to do the same thing on your WordPress website.
About URLs as sentences
Ideas on the “proper” way to create URLs differ. Arguments range from so-called SEO benefits to what is most user friendly. While I won’t argue that URLs as sentences are either of those two (since the former barely interests me and the latter is entirely subjective), I will argue that they are fun to use.
An example of a URL sentence is in your browser right now:
Left to right, the URL reads as a complete (or near complete) sentence.
The first place I learned about this technique was Chris Shiflett’s blog, though there are definitely other examples out there. I thought it was very clever, and set about implementing it on each of the new WordPress sites that I created.
To create these URLs, we’re going to need to take a bit of control over our WordPress permalinks.
What are WordPress permalinks?
Permalink stands for permanent link. Within WordPress, it’s used to refer to the structure of the dynamic links that are created to form your site’s posts, archives, and pages.
Turning page slugs into sentences
Pages, on their own, have permalinks that are straightforward to control. On the Add New Page or Edit Page screens, simply edit the slug to create a sentence.
On WPCandy, for example, we use a few of these:
- About page
- Contact page
- Submit news page
On my site, my personal blog, I use these:
- Ryan’s projects
- Know Ryan personally?
Think up creative uses for page slugs. They’re easy to change, and the potential hierarchy gives you more opportunities to mix things up.
Categories and tags
Categories and tags are a step more difficult, in that by default they each display with initial bases like this:
WordPress does give you control over the base that is used there, via the Settings > Permalinks page. You can use this to create sentence-like bases; for instance on WPCandy the tag base is “on”. So we’re able to link up topics using URLs like this:
Or like this (appropriate for this week):
That’s a helpful way of making a pseudo sentence, or at least something human-readable, out of a URL that will inevitably end in a noun of some sort.
For categories you might be able to try to the same thing, though in our case we’re using the No category parents Plugin to remove the /category/ base from category archives in general. That’s because we’re using category slugs to write our sentences out. So for the news archive, instead of using:
That’s achieved by combining the Plugin with customized category slugs, which you can change on the Posts > Categories page on the Dashboard. Changing a category’s slug is as easy as changing slugs anywhere else within WordPress. The difficulty can be choosing the write word to pair with a category.
Once you get the knack of turning category slugs into useful verbs like this, you can take the next step (that we chose to do) and include that category in your permalinks structure, by selecting Custom Structure on the Permalink Settings page and using this:
Now, as long as your post slugs are now written to accompany your category slugs, your URLs will read nicely as sentences, just like WPCandy’s URLs.
Other, auxiliary pages
There are other types of pages to consider within your website. Author archive pages, for instance, by default look like this:
“Author” isn’t a very good verb (spoiler: it isn’t a verb). So in order to change that base as well, we can install a Plugin similar to the category base one mentioned above called Edit Author Slug to achieve
/by/ryan-imel/ instead of the default
Side note: This is one of those awesome Plugins that falls into the category (my own category) of “does things right”. Instead of creating its own management screen for the simple purpose of editing the author archives slug, it simply adds another line of control to the Permalink Settings screen. Beautiful.
There are also post archives by date, which really come in two forms:
- Paging through archives (next/previous style):
- Viewing specific monthly or yearly archives:
I’ll be honest, I have no great ideas for making these types of URLs into sentences. They are in this format on WPCandy, and I don’t really have any plans to change them. These fall through the cracks into the category of “the types of URLs visitors may type on their own to see a specific thing” and because of that, are probably not worth playing with much anyway.
Have fun with it
In the end, find a way to have fun with your URLs. Odds are that if you care about it, then others will too. Your fun with your site will become infectious, and your visitors might enjoy it more.
Have you implemented these URLs into your WordPress site? Why or why not? Any creative examples that I haven’t thought of?