humanmade / humanmade/primary-category
Add category Name Override and Short Name Support
- Dominant language
- PHP
- Stars
- 1
- Forks
- 0
- Avg merge
- 9m
- Merged PRs (30d)
- 2
Description
Add optional configuration capabilities for primary category display customization.
## Features to Implement
### 1. Short Name
Allow categories to have an alternative "short name" that can be used consistently across templates where space is limited or a different presentation is preferred.
**Implementation Details:**
- Add a `short_name` term meta field to categories
- Field should be optional and fall back to the regular category name if not set
- Expose via REST API for block editor support
- Add a `get_short_name()` helper function
### 2. Category Override (Per-Post Level)
Enable editors to override the displayed category name on a per-post basis without changing the actual category.
**Implementation Details:**
- Add a `_category_override` post meta field
- Field should be optional and fall back to the category name (or short name if available)
- Only affects display, not the actual category assignment
- Expose via REST API for block editor support
For reference:
- this has been implemented on other projects, reach out to the Americas Squad for more details.
- It was brifly implemented on primary category at first but we decided to not go further and lunch an MVP, this is the base for it: https://github.com/humanmade/primary-category/pull/1/changes/5822eb295ec10b038da276137cf7a7c1e92a7c7e
Contributor guide
No contributing guide indexed for this repository
Assessment
This issue has not been assessed yet.