WordPress Plugins: sCategory Permalink – select category for permalink generation

Posted by Dmytro Shteflyuk on under WordPress

I’m starting publishing custom WordPress plugins used in this blog, and today it will be “sCategory Permalink”. I like permalink option of WordPress %category% (and using it here), but it has one great limitation – when this option is selected, WordPress uses category with lowest ID for permalink generation! Just imagine following scenario: you have category “Development” (common for all posts related to software building), and several specific categories, for example “PHP”, “AJAX”, “JavaScript”. You have Development category ID greater than any of other categories IDs, therefor specific categories used for URL generation. But one day you decided to start learning Ruby on Rails and post about this in your blog. It’s the problem, because when you will create category “Ruby on Rails”, its ID will be greater then ID of “Development”. Now you have to take decision: to abandon posting in both categories at the same time, or to update “Development” category ID. Lastest can be done in two ways: remove category from WordPress administration area and re-add it (and then you need to go through all of your posts and add needed to this category), or update ID in database (there are several tables related on category ID). But now you can relax! Just download and install plugin!

Read the rest of entry »