For each post, author can choose which category is used in permalink.
You still can set category permalinks when creating and editing posts, but their permalinks won't have any category on them. When you decide to use
%category% in your permalinks, saved categories will start being used.
Your posts URLs will of course change, and not have category on them anymore. But postmeta will remain saved and you'll still be able to set them, and when you decide to use the
%category% tag again they'll be used.
Hikari Category Permalink just does nothing and send the permastruct back to WordPress to deal with it in its default. WordPress default is use the category with lowest ID.
It's inefficient because WordPress generates and parses permalinks dynamically, they aren't stored, and to parse it uses general expressions and database queries. If you only have string tags in posts permalinks, there's no way for WordPress to distinguish posts from pages, and then it must use slower methods to identify a post.
Hikari Category Permalink uses the standard
%category% tag and doesn't require any rewrite rules tweaking, all its tweaks are in permalink creation (
get_permalink() function) and not in parsing, so your permalink structure has the same weakness it would have if the plugin wasn't being used. I suggest adding an integer tag somewhere in the structure (begining, middle or end, if you use more than 1 string tag I suggest adding an int tag between them). My prefered one is
%post_id%, because its meaning is directly related to the post, and you have quick view to a post ID when you can see its permalink.
sCategory Permalink is a great plugin, it was original, unique, and pionner. For long we were in need of a category-in-permalink solution than the simple the-one-with-lowest-ID WordPress offers. Dmytro was able to imagine a much better solution and implement it.
But the plugin was bugged, it's in v0.6.2 for a long time, and I was still using v0.3.0, because any version above it was generating 404 for me in any post, while v0.3.0 generates 404 when I use multipaged comments. Dmytro offered the plugin for free and made it almost perfect, but it wasn't being supported anymore and he didn't answer my contact attempts, so I decided to fix it.
I wasn't able to fix the original bugs, but discovered that with a new filter inside
get_permalink(), the code with original bugs wouldn't be needed anymore, the plugin would be much simpler to tweak WordPress and permalink generation would be much more flexible. I opened a ticket in WordPress trac requesting the new filter, and it was added to 3.0! :D
Since I can't contact Dmytro, I just forked the plugin and enhanced it.
Yes, I did that :P
It uses the same postmeta, so all your existing category permalinks will be used, and new ones will use the same name, all simple. And with the advantage of 404 errors being totally gone, since Hikari Category Permalink doesn't touch rewrite rules! :D
And one more thing, once the upgrade is done, if you are using WordPress 3.0 or above, go to Settings > Permalink and replace legacy
%scategory% tag to stantard
It indeed supports and I've been using in it, even 2.8 may work. But when used in WordPress below 3.0, the legacy
%scategory% tag must be used, standard
%category% doesn't work, and therefore 404 error when multipages comments are used may occur. I just hacked my WordPress core and added the filter that only 3.0 has natively, but I won't explain other people how to do it in 2.9 and won't support any bug on it, I only support Hikari Category Permalink in WordPress 3.0 and above :)
Requires: 3.0 or higher
Compatible up to: 3.0.5
Last Updated: 6 years ago
Active Installs: 1,000+
Got something to say? Need help?