WP 1.3+ Suggestion: Post Slug Locking and Required Titles
I’m prone to making suggestions about WordPress functionality, but I think these two are pretty important.
- Lock Post Slugs after posting.
No one editing an already-published entry should be able to edit the post slug. The post slug is used to make the permalink in WP 1.2+, and I think that’s great functionality; however, if the post slug is edited the concept of the permalink is absolutely lost. The slug should be an enter-once-and-never-edit value and locked appropriately in the SQL and the scripting. - Require titles for WP installs that use /%postname%/ in the cruft-free URL generation process.
This goes along the same lines; if you fail to provide a title, you get an entry with the following URL: http://example.com/archives/YYYY/MM/DD//. Clicking this URL is the same as clicking http://example.com/archives/YYYY/MM/DD/, for all practical purposes. This also creates the potential for confusion if two posts are made on the same day with no post-slug. One could require a title to be written with simple Javascript, or a check could be done for a title in the publishing process, saving a draft and instructing the user to enter a title for unnamed entries.
[An alternative resolution would be to use the entry number as the post slug in cases where the entry is untitled.]
Let’s face it: users sometimes forget how their software is actually used. I think the software can be reasonably and intelligently designed to provide good benefit for user and reader alike, and I think that it should be done.
Posted August 5th, 2004 in WordPress by Geof F. Morris.

Did this come about from my lack of title on the post that tracked back over here?
August 5th, 2004 at 16:23Yes. I’ve been thinking about this for a while, and I had a free moment, so I posted it. You may call yourself a catalyst. [BTW, I edited the comment with the correct URL.]
August 5th, 2004 at 16:28No, Geof, you’re wrong. I would say make it so you have to click a checkbox to edit the post slug (much like with the timestamp.) Yeah, yeah, permalinks shouldn’t change, but I’m writing crap on my weblog, not clay tablets. What if I make a spelling mistake in my post slug? Now I have to go in to the DB and screw around with SQL to fix it? Muck that! Plus, I bet way more people make spelling mistakes than know SQL.
I’m not sure if I agree with you that titles should be *required*, per se, but something definately has to be done.
August 5th, 2004 at 17:15I can see your point, John, but until someone can come up with a solution that can point people using an outdated permalink at the right entry …
:thinks:
I can think of a way to do that. It would be a conditional thing—to check for on a permalink failure—but it could work. You’d create a linking table similar to wp_post2cat and keep a running list of all post slugs; every time one is pushed to the db, another record is made. That way, WP can then error check against that table and know the post ID and have mod_rewrite build the correct URL anyway.
Seems like it would work, but that would be a pain to script, I bet.
Thanks for challenging my assertion, John. I’d been vacillating on it, and I decided I’d take a stand and see if anyone said BS.
August 5th, 2004 at 17:22What the heck is a “post slug” anyhow?
August 5th, 2004 at 18:39Check the link in the main entry, Brad.
August 5th, 2004 at 19:01Oh. They’re those silly things. I never understood why you couldn’t use simple things like numbers, so the URL for the first post on 2004-08-05 would go /2004/08/05/1/ and the second would be /2004/08/05/2/ and so on, instead of having to resort to even longer URLs.
I guess I just don’t see the advantage of putting text in there.
August 5th, 2004 at 19:56I think it’s a manner of preference and aesthetics. There are a few different schools of thought on the subject.
August 5th, 2004 at 20:39The ID thing has been in the CVS since a few weeks after 1.2.
August 6th, 2004 at 14:28Brad: well, the best reason I can see for putting text there is to f with google.
August 6th, 2004 at 15:33