Make WordPress Core

Opened 19 years ago

Closed 14 years ago

#4358 closed enhancement (duplicate)

Allow users to specify "primary" category

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

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)

#1 @markjaquith
19 years ago

  • Description modified (diff)
  • Type defect → enhancement

#2 @starlyth
19 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.

#3 @nickgeorgakis
19 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!

#4 @ffemtcj
19 years ago

  • Milestone 2.5 → 2.6

#5 @Denis-de-Bernardy
17 years ago

  • Component Administration → Canonical
  • Keywords needs-patch added
  • Milestone 2.9 → Future Release

#6 @Denis-de-Bernardy
17 years ago

  • Milestone Future Release
  • Resolution → wontfix
  • Status new → closed

no interest in over 2 years...

#7 @bozzmedia
14 years ago

  • Resolution wontfix
  • Status closed → reopened

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

#8 @SergeyBiryukov
14 years ago

  • Keywords needs-patch removed
  • Resolution → duplicate
  • Status reopened → closed

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

Last edited 14 years ago by SergeyBiryukov (previous) (diff)
Note: See TracTickets for help on using tickets.