sCategory Permalink

Posted by Dmytro Shteflyuk on · Русский (39,436 views)

Plugin allows to select category which will be used to generate permalink on post edit page. Use custom permalink option %scategory% on Options/Permalinks options page.

Installation

  1. Download and unpack plugin files to the wp-content/plugins/scategory-permalink directory.

  2. Enable sCategory Permalink plugin on your Plugins page in Site Admin.

  3. Open the Options/Permalinks page in Site Admin and use %scategory% option in Custom Structure text field (you can look here for other options). In this blog I’m using /%scategory%/%postname%/ structure.

  4. When you move your mouse over category in Categories box the Primary link will appear on the right.

    Choose a category for permalink generation

    Click it to set the category which will be used to generate permalinks. It will be highlighted with bold.

  5. Have fun!

Upgrade

  1. Download and unpack plugin files to the wp-content/plugins/scategory-permalink directory.

  2. Open the Options/Permalinks page in Site Admin and and click Save Changes to re-generate permalinks.

  3. When you move your mouse over category in Categories box the Primary link will appear on the right. Click it to set the category which will be used to generate permalinks. It will be highlighted with bold.

Demonstration

I have recorded a small screencast on how sCategory Permalinks works starting from version 0.6.0:

Requirements

Plugin works pretty well with the WordPress 2.7.0 — 2.8.2. Hey users of WordPress 2.7.0, could you explain why do you use so old buggy crap? Use new one instead, at least it looks more beautiful!

Download

Latest version of sCategory Permalink is 0.6.2, and it could be downloaded here:

version0.6.2DownloadsCategory Permalink

Also you can download older versions from plugin home page on WordPress.org (but do you really need this old stuff?).

Frequently Asked Questions

Q. Every page on my site responds with error 404
A. Go to Options/Permalinks page in Site Admin and click Save Changes to re-generate permalinks.

Q. First category is used for permalinks instead of selected
A. Check the permalinks structure you used (Options/Permalinks). You should use %scategory% instead of %category%.

Q. I love this plugin. How to do a favor to the author?
A. Just vote for this plugin on WordPress.org. And thank you!

Support

If you have any suggestions, found a bug, or just wanted to say “thank you”,– feel free to contact me. Promise, I will answer to every message.

If you want to contribute your code, see the Development section below.

Development

Sources of this plugin are available both in SVN and Git:

Feel free to check them out, make your changes and send me patches. Promise, I will apply every patch (of course, if they add a value to the product). Email for patches, suggestions, or bug reports: kpumuk@kpumuk.info. Also you have much more ways to contact me.

Changelog

  • 0.6.2 (July 30, 2009)
    • Nothing really changed. Just to force WordPress to update version.
  • 0.6.1 (July 30, 2009)
    • Fixed blank page when post edit page requested.
    • Fixed “Primary” link appear on all sub-categories, when category selected.
  • 0.6.0 (July 30, 2009)
    • Client side script completely rewritten. New visual look and better usability (thanks to Nikolay Kolev).
  • 0.5.0 (July 28, 2009)
    • Fixed problem with Subscribe2 plugin (thanks to Paul Wagorn).
    • Performance improvement (update meta tags only once per save).
  • 0.4.0 (July 21, 2009)
    • Fixed not-found bug when /%year%/%scategory%/%posttitle% permalink used.
    • Fixed not-found bug when paged comments enabled (/comment-page-N).
    • JavaScript rewritten using jQuery library.
  • 0.3.0 (April 4, 2008)
    • Fixed bug when pages was not found in WordPress 2.5.
  • 0.2.2 (May 20, 2007)
    • Sometimes radio buttons was not displayed (thanks to Vince Caughley and Sam Keen).
  • 0.2.1 (Apr 1, 2007)
    • Removed dependency on deprecated WordPress 1.5 function wp_get_post_cats.
  • 0.2.0 (Mar 30, 2007)
  • 0.1.0 (Nov 18, 2006)
    • Initial plugin implementation.

Other plugins

Full list of plugins I have implemented is available here.

113 Responses to this entry

Subscribe to comments with RSS or TrackBack to 'sCategory Permalink'.

Ruzanna
said on August 6, 2009 at 1:36 pm · Permalink · Reply

i’m using wordpress 2.7.1. and scategory 0.6.2. everything was working perfectly with scategory 0.3.0., but once i updated to 0.6.2., the plugin stopped working, there is no ‘primary’ button appearing when i move the mouse over the category names. please advise.

Ruzanna
said on August 6, 2009 at 1:50 pm · Permalink · Reply

and here is the list of all plugins i use:

Add Meta Tags 1.6
Add to Any: Share/Bookmark/Email Button .9.9.3.4
Akismet 2.2.6
Bad Behavior 2.0.28
Dagon Design Form Mailer 5.6
Digital Fingerprint Beta 0.2
External Links 3.0.4
Google XML Sitemaps 3.1.4
Role Manager 2.2.2
sCategory Permalink 0.3.0
SEO Friendly Images 2.4.2
SEO Slugs 1.0
Thumbnail For Excerpts 1.3
WordPress Database Backup 2.2.2
Yet Another Related Posts Plugin 3.0.8

said on August 24, 2009 at 4:57 pm · Permalink · Reply

Just a heads up… the “Primary” link doesn’t appear in Chromium for Mac… which is admittedly a beta, but yeah. Would love an option to re-enable radio buttons, but understand if that’s not exactly a high priority.

Angie @
said on September 3, 2009 at 2:20 pm · Permalink · Reply

Hi Dmytro!
GREAT GREAT GREAT plugin!

but it doesn’t work in my blog :(
I use WP 2.7.1 and the last version of your plugin
I activated it and I changed the permalink with %scategory% then save but…nothing happens! I can’t see the radio button, the “primary” link, I don’t even have the 404 error when I access to my posts that still have the old permalinks!
How can I fix it?

Thank you so much, and sorry for my bad english

said on September 5, 2009 at 11:10 am · Permalink · Reply

Same problem here with WP 2.7
I can’t see any ajay primary link appearing in the category widget. Also when I change category, it puts all the postings to my primary default category
Any idea how to fix?
Thanks

said on September 16, 2009 at 4:21 pm · Permalink · Reply

This plugin is not working for me for quite some time (sorry, but I didn’t kept track of both the plugin and WordPress version).

On the editor window I can see the “Primary” link and (still in the editor window) it seems to work, but if I use:

1
/%scategory%/%postname%/

and then navigate my site, I get the 404 error on every post. Of course I tried to regenerate the permalinks.

Any idea.

said on September 23, 2009 at 3:46 pm · Permalink · Reply

This is a true gem of a plugin, just wanted to let you know that.

And also I noticed (on WP 2.9-rare) that the plugin doesn’t work for previewing posts, the category doesn’t use the scategory.

I love this plugin.

said on September 23, 2009 at 4:02 pm · Permalink · Reply

MANY MANY people are getting the below error

1
2
3
"Fatal error: Call to undefined function add_action()"
....
"plugins/scategory-permalink/scategory_permalink.php on line 33"

Same with me. How to solve this ?

regards,
ASHISH THAKKAR

said on September 23, 2009 at 4:55 pm · Permalink · Reply

It means that your version of wordpress is old and exploitable. you need to upgrade.

said on October 15, 2009 at 10:41 pm · Permalink · Reply

After installing all my posts show 404. I regenerated the permalink structure several times. I want my permalinks to look like this:

1
/%scategory%/%postname%-event.htm

I’ve read all the above comments and I saw that there might be a problem with having “.htm” at the end of my permalink structure.

I also have the WP No Category Base plugin installed.

said on October 16, 2009 at 12:09 pm · Permalink · Reply

Thank you for your bug report. I will check it and fix soon (there is one more bug has been fixed yesterday with WordPress 2.7, so the new version will go to public in nearest future).

kadavy @
said on October 16, 2009 at 1:32 am · Permalink · Reply

Really awesome plugin, and it works as prescribed, but I had another use in mind:

I wanted to use this in conjunction with the “All in One SEO” plug-in to append the primary category to the end of the post title, but it looks like the %scategory% variable doesn’t work in this context — any ideas?

said on October 16, 2009 at 12:12 pm · Permalink · Reply

I will check how I can penetrate to the All in One SEO Pack logic to get sCategory Permalinks working with it. Thank you for you report.

said on October 18, 2009 at 4:27 pm · Permalink · Reply

Hi Dmytro,

That would be a very very nice addition to this plugin. I discovered just today that my URLs wearen’t matching with my All in One SEO Pack titles and I tried the same as kadavy without success.

Thanks for looking in to it!!!

Hikari @
said on November 16, 2009 at 10:21 pm · Permalink · Reply

Hey Dmytro, really great plugin, I’ve been using it for months and WP should have this feature by default!

Thanks a lot for maintaining it and BIG thanks for supporting all questions and bug reports ^^

More comments: 1 2 3 4

Post a comment

You can use simple HTML-formatting tags (like <a>, <strong>, <em>, <ul>, <blockquote>, and other). To format your code sample use [cc lang="php"]$a = "hello";[/cc] (allowed languages are ruby, php, yaml, html, csharp, javascript). Also you can use [cc][/cc] block and its syntax would not be highlighted.

Submit Comment