Allows manual selection of a primary category to use in post permalinks (replaces %category%).
This plugin is provided "as is" without warranty of any kind, either expressed or implied. Use at your own risk. The author is not responsible for any damage or loss of data that may occur through the use of this plugin.
By using this plugin, you agree to these terms.
Custom Primary Category for Permalinks gives you full control over which category appears in a post’s permalink—especially useful when a post is assigned to multiple categories. By default, WordPress may choose a category that isn’t ideal for SEO. This plugin lets you manually select a "primary" category, ensuring your permalinks stay clean, relevant, and optimized for search engines.
Includes fallback behavior and is compatible with standard permalink structures using %category%.
- Upload the plugin to your WordPress site or install it through the WordPress plugin directory.
- Activate the plugin.
- Edit a post with multiple categories. You’ll see a Primary Category dropdown in the sidebar (below Categories or Publish depending on your setup).
- Choose your preferred primary category.
- Save, update, or schedule the post for the changes to take effect.
- The primary category list only updates when the post is saved or scheduled. It does not automatically reflect category changes in real time.
- Permalink preview does not dynamically update in the editor when switching the primary category, but the saved permalink will be correct.
- Gutenberg and Divi compatibility has not been fully tested.
- Dynamically update the primary category selector when categories are added or removed from the post.
- Dynamically update the permalink preview in real time when selecting a new primary category.
- Full compatibility testing for Gutenberg and Divi editors.
GPLv2 or later
https://www.gnu.org/licenses/gpl-2.0.html
Justin Blayney
https://www.darkstarmedia.net