Workaround for ?tegoryname% in permalink if post has no category?
-
My permalink structure is
/%category%/%post_id%/%postname%
Which gives nice URLs, like
https://myblog/news/5833/this-is-my-post
Problem is, if a post doesn’t have a category, the permalink doesn’t work. I’m not a rewrite expert but the following rewrite rule doesn’t seem to fix it:
'/([0-9]{1,})/' => 'index.php?p=$matches[1]'
What am I missing?
Viewing 3 replies - 1 through 3 (of 3 total)
Viewing 3 replies - 1 through 3 (of 3 total)
- The topic ‘Workaround for ?tegoryname% in permalink if post has no category?’ is closed to new replies.