I am testing a WordPress theme using the WordPress Theme Unit Test test data. One of the test posts has no title. WordPress generates a permalink of the form:
<my-site>/posts/14/
(my permalink structure is “/posts/%postname%/”).
The WordPress recommendation is “Post permalink should be displayed. Making the post date a permalink is a great solution.”
That’s exactly what I did. Unfortunately, when I click on the link:
- I do not get the post in question. The page I do get appears to be the similar to the paged index of all posts, except that all non-paged posts are displayed in full, instead of as excerpts.
- The page navigation is incorrect. The link for older posts is “/posts/14/page/2/”, which causes the same page to be redisplayed.
If I change the post slug to “post14”, it works just fine, so the problem is evidently due to the numeric slug.
Obviously I could change the slug, but that’s not a real solution. Once the theme gets out in the real world, I can’t guarantee that users will always use post titles or that they’ll know enough to change the slug.
Any suggestions?