
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:
https://www.example.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):
https://www.example.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:
https://www.example.com/category/applications/web/wordpress/
With this plugin activated, that link would become:
https://www.example.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 | GitHub | Author Homepage
The plugin exposes one filter for hooking. Code using this filter should ideally be put into a mu-plugin or site-specific plugin (which is beyond the scope of this readme to explain). Less ideally, you could put them in your active theme’s functions.php file.
c2c_single_category_redirect_status (filter)
The ‘c2c_single_category_redirect_status’ hook allows you to specify an HTTP status code used for the redirect. By default this is 302.
Arguments:
Example:
/** * Change the redirection HTTP status to a 302. * * @param int $code The HTTP status code. By default 301. * @return int */ function scp_change_redirect_status( $code ) { return 302; } add_filter( 'c2c_single_category_redirect_status', 'scp_change_redirect_status' ); Starting from $0 per month.
Rating
Reviewers
5 reviews
Tags
Developed By
Scott Reilly
Quick & Easy
Common Ninja has a large selection of powerful Wordpress plugins that are easy to use, fully customizable, mobile-friendly and rich with features — so be sure to check them out!
Testimonial plugins for Wordpress
Galleries plugins for Wordpress
SEO plugins for Wordpress
Contact Form plugins for Wordpress
Forms plugins for Wordpress
Social Feeds plugins for Wordpress
Social Sharing plugins for Wordpress
Events Calendar plugins for Wordpress
Sliders plugins for Wordpress
Analytics plugins for Wordpress
Reviews plugins for Wordpress
Comments plugins for Wordpress
Portfolio plugins for Wordpress
Maps plugins for Wordpress
Security plugins for Wordpress
Translation plugins for Wordpress
Ads plugins for Wordpress
Video Player plugins for Wordpress
Music Player plugins for Wordpress
Backup plugins for Wordpress
Privacy plugins for Wordpress
Optimize plugins for Wordpress
Chat plugins for Wordpress
Countdown plugins for Wordpress
Email Marketing plugins for Wordpress
Tabs plugins for Wordpress
Membership plugins for Wordpress
popup plugins for Wordpress
SiteMap plugins for Wordpress
Payment plugins for Wordpress
Coming Soon plugins for Wordpress
Ecommerce plugins for Wordpress
Customer Support plugins for Wordpress
Inventory plugins for Wordpress
Video Player plugins for Wordpress
Testimonials plugins for Wordpress
Tabs plugins for Wordpress
Social Sharing plugins for Wordpress
Social Feeds plugins for Wordpress
Slider plugins for Wordpress
Reviews plugins for Wordpress
Portfolio plugins for Wordpress
Membership plugins for Wordpress
Forms plugins for Wordpress
Events Calendar plugins for Wordpress
Contact plugins for Wordpress
Comments plugins for Wordpress
Analytics plugins for Wordpress
Common Ninja Apps
Browse our extensive collection of compatible plugins, and easily embed them on any website, blog, online store, e-commerce platform, or site builder.
Nudge button with a subtle shaking animation that draws attention to important calls to action, increases interaction, and helps boost conversions.
Create interactive video polls that use engaging clips to boost participation, gather insights, and help visitors vote in a more dynamic way.
Use a subscription button to streamline recurring payments, simplify signup, and help increase conversions with seamless PayPal or Stripe integration.
Show Bluesky posts with a Bluesky feed slider that scrolls updates and keeps content visible while keeping visitors engaged.
Add an MP3 Player to your website and engage visitors with music, podcasts, and spoken audio without any setup complexity.
Show Facebook reviews to build trust, improve credibility, and help visitors make confident purchase decisions that support higher sales.

Show Pinterest content in a Pinterest feed that keeps your page visually engaging, highlights new ideas, and helps visitors explore fresh inspiration.
Use an order form to let customers submit product orders, save entries, receive notifications, and collect payments through PayPal or Stripe for a smoother buying experience.
Add a countdown timer to your site to highlight upcoming events or launches and encourage timely user action.
Show payment method logos that highlight accepted payment options, build trust at checkout, and help visitors feel confident completing their purchase.
Present images in a Slideshow carousel that rotates or slides through visuals, helping you highlight key content within a clean, engaging layout.
Use the QR Code Generator to create and display QR codes for URLs, contact info, downloads, locations, and more.
More plugins
The Common Ninja Search Engine platform helps website builders find the best site widgets, apps, plugins, tools, add-ons, and extensions! Compatible with all major website building platforms - big or small - and updated regularly, our Search Engine tool provides you with the business tools your site needs!
