BUY LASIX NO PRESCRIPTION - Reliable Online DrugStore

WordPress Tip:Make your permalinks choppable

12.26.2007 @ 3:47 PM in Technology
wordpress.jpg Before I start, Changing your permalink structure on a year old blog is like moving a neighborhood one block over, but vaporizing any trace of the old block. All external links to posts, archived feeds, even cached searches can end up going to your 404 page. You can fix this by setting up a 301 redirection in your htaccess, but you'd have to do this for every post. Thats just ridiculous, and thank god Urban Giraffe made a plugin to help this along. If you ever decide do change your permalinks in Wordpress, use Advanced Permalinks and import your old structure into the migrate tab. This will apply a quick 301 redirection on every old address. That done, now the for the change. One way to make wordpress feel more your own is to create a custom permalink structure.
  • By default the structure is
Since Wordpress is one of the top two blog platforms (the other is movabletype) and such few people actually care to change their structure, you see links like this everywhere. This structure isn't actually bad, in fact it's set up to allow backlinking:
  • <- chop off "post-title/" and you get
  •<- which lets you see all the posts for that day (12-16-2007)...
  • <- month (December 2007),
  • <- and year (2007).
The downside is that not many people actually think or need to do this if you already offer archival links on your site, and back linking is only good for trying to get into someone's online pr0n or music folder. Additionally, when paired with a lengthy post title, your permalink grows to an obnoxoius size. Sharing a link with a friend on twitter or myspace can force you to use a URL shortening service like tinyURL. It's nice to be be able to post a link without having to mask it, so I decided to change my permalink structure to be self-shortening.
  • New Structure:
  • change it by going to Options » Permalinks and entering a new structure in the custom section.
  • if you are using Advanced permalinks, click on "Migration" and enter the old permalink structure to ensure that your old links still work.
Notice I completely tossed out the datestamp in the permalink, and replaced it with %post_id%. Let's see how backlinking affects this permalink.
  • <-- If you lop off "post-title/"
  •<-- you get just the numerical id of the post, which is small enough to post to twitter, and retains my domain.
Now there is a downside to this: your readers most likely will not intuitively deduct that they can do that, or even care for that matter. But you can, and it makes you look a little more custom. If you are at all crafty at chopping up templates, you can display the shortened permalink with this code in your loop.
<a href="<?php bloginfo('url') ?>/<?php the_ID(); ?>">Shortlink</a>
  • 1 Comment