WordPress.org

Ready to get started?Download WordPress

Plugin Directory

Single Category Permalink

Reduce permalinks (category or post) that include entire hierarchy of categories to just having the lowest level category.

Reduce permalinks (category or post) that include entire hierarchy of categories to just having the lowest category in the hierarchy.

By default, WordPress replaces the %category% permalink tag in a custom permalink structure with the entire hierarchy of categories for the post's first matching category. For example, assuming your site has a hierarchical category structure like so:

Applications
  |_ Desktop
  |_ Web
    |_ WordPress

By default, if you have a permalink structure defined as %category%/%year%/%monthnum%/%day%/%postname%, your post titled "Best Plugins" assigned to the "WordPress" category would have a permalink of:

http://www.yourblog.com/applications/web/wordpress/2008/01/15/best-plugins

If you activate the Single Category Permalink plugin, this would be the permalink generated for the post (and recognized by the blog):

http://www.yourblog.com/wordpress/2008/01/15/best-plugins

In order for a category to be used as part of a post's permalink structure, %category% must be explicitly defined in the Settings -> Permalinks admin page as part of a custom structure, i.e. /%category%/%postname%.

For category links, %category% is implied to follow the value set as the "Category base" (or the default category base if none is specified). So if your category base is 'category', the above example would list posts in the 'WordPress' category on this category listing page:

http://www.yourblog.com/category/applications/web/wordpress/

With this plugin activated, that link would become:

http://www.yourblog.com/category/wordpress/

NOTE: The fully hierarchical category and post permalinks will continue to work. The plugin issues a 302 redirect to browsers and search engines pointing them to the shorter URL.

Links: Plugin Homepage | Plugin Directory Page | Author Homepage

Requires: 1.5 or higher
Compatible up to: 3.8.3
Last Updated: 2014-1-25
Downloads: 5,964

Ratings

5 stars
5 out of 5 stars

Support

Got something to say? Need help?

Compatibility

+
=
Not enough data

0 people say it works.
0 people say it's broken.

100,1,1
100,1,1
0,1,0
0,1,0