Make WordPress Core

Opened 8 years ago

Closed 3 years ago

#4358 closed enhancement (duplicate)

Allow users to specify "primary" category

Reported by: markjaquith Owned by:
Milestone: Priority: normal
Severity: normal Version:
Component: Canonical Keywords:
Focuses: Cc:

Description (last modified by markjaquith)

For people with category-based permalink structures, the ability to set a primary category which would be used to craft the URL would be very valuable.

See: http://nslog.com/2007/05/25/wordpress_22_changes_category_order_behavior

The tricky part here is UI... get those gears churning.

Change History (8)

comment:1 @markjaquith8 years ago

  • Description modified (diff)
  • Type changed from defect to enhancement

comment:2 @starlyth8 years ago

My UI suggestion would be a simple drop down menu above the current category menu selection "window".

I also have to say that, while I will not change the properties, I think this is a defect, as it does mess your permalink structure. I feel this is just below blocker as a priority. My guess that the major ramification is that this would be a one way database upgrade.

comment:3 @nickgeorgakis8 years ago

This might not be the right place to add this (Feel free to delete this post if inappropriate) but I have developed a custom plugin to do just that - specify a custom primary category that is used to generate the permalinks
/ NG Primary Category Plugin
Currently I have to modify the categories checkboxes through PHP output buffering using preg_replace - maybe a new WordPress hook would make it easier.
By adding the primary category ID in post meta data no Database changes are required.
I had to copy parts of Wordpress
\wp-includes\link-template.php: function get_permalink() in my plugin
Couldn't be possible to implement something similar in a future WP version?
Any suggestions are welcomed!

comment:4 @ffemtcj8 years ago

  • Milestone changed from 2.5 to 2.6

comment:5 @Denis-de-Bernardy6 years ago

  • Component changed from Administration to Canonical
  • Keywords needs-patch added
  • Milestone changed from 2.9 to Future Release

comment:6 @Denis-de-Bernardy6 years ago

  • Milestone Future Release deleted
  • Resolution set to wontfix
  • Status changed from new to closed

no interest in over 2 years...

comment:7 @bozzmedia3 years ago

  • Resolution wontfix deleted
  • Status changed from closed to reopened

Any new thoughts or movement on this? This remains a valuable enhancement proposal.

comment:8 @SergeyBiryukov3 years ago

  • Keywords needs-patch removed
  • Resolution set to duplicate
  • Status changed from reopened to closed

This is fixed [21169] by introducing a filter. Closing as a duplicate of #18752.

Version 0, edited 3 years ago by SergeyBiryukov (next)
Note: See TracTickets for help on using tickets.