Custom Taxonomies
Overview
The Custom Taxonomies feature in the Phenix Design System provides a user-friendly interface for creating and managing content classification systems in WordPress without writing code. Taxonomies allow you to organize and categorize your content in meaningful ways, such as by topic, location, status, or any other classification that makes sense for your site. With comprehensive options for customization and integration with custom post types, taxonomies become a powerful tool for content organization and navigation.
Key Features
- No-code creation of custom taxonomies through an intuitive interface
- Comprehensive configuration options for labels, capabilities, and display settings
- Association with multiple post types for flexible content organization
- Hierarchical or non-hierarchical taxonomy structures
- Full integration with WordPress block editor and site editor
- REST API integration for headless WordPress implementations
- Template support for custom taxonomy archives
Understanding Taxonomies
Taxonomies are systems of classification that help organize content. WordPress comes with two default taxonomies:
- Categories: Hierarchical groupings for posts (like folders)
- Tags: Non-hierarchical keywords for posts
Custom taxonomies extend this concept to any type of classification you need, such as:
- Service Types
- Locations/Regions
- Industries/Sectors
- Product Features
- Project Status
- Team Departments
- Event Types
- Skill Levels
- Content Formats
Each taxonomy can be applied to one or more post types, allowing for flexible content organization.
Accessing Custom Taxonomies
To access the Custom Taxonomies management interface:
- In your WordPress admin, navigate to Phenix Design System
- Select the Data Collection tab
- Click on the Taxonomies sub-tab
Creating a New Custom Taxonomy
To create a new custom taxonomy:
- Access the Taxonomies interface as described above
- Click the Add New Taxonomy button
- Fill in the following information in the form:
Basic Settings
Setting | Description |
---|---|
Taxonomy Name | A unique identifier (lowercase, no spaces) |
Singular Label | How a single term is referred to (e.g., "Service Type") |
Plural Label | How multiple terms are referred to (e.g., "Service Types") |
Description | Brief explanation of the taxonomy's purpose |
Advanced Settings
Setting | Description |
---|---|
Public | Whether the taxonomy is publicly queryable |
Show in Menu | Whether to show in admin menu |
Hierarchical | Whether terms can have parent-child relationships (like categories) |
Show Admin Column | Whether to show a column in the post list table |
Show in REST | Whether to include in the WordPress REST API |
Show Tag Cloud | Whether terms can be displayed in a tag cloud widget |
Show in Quick Edit | Whether to show in the quick/bulk edit panel |
Associated Post Types
Select which post types this taxonomy should be associated with. This can include:
- WordPress default post types (posts, pages)
- Custom post types you've created
Labels
Customize all labels used throughout the WordPress admin:
- Add New
- Edit
- View
- Search
- Not Found
- And more...
- Click Save Taxonomy
Managing Custom Taxonomies
The Taxonomies interface displays all your custom taxonomies with the following options:
Option | Description |
---|---|
Edit | Modify the taxonomy settings |
Delete | Remove the taxonomy (warning: this will delete all terms in this taxonomy) |
Using Custom Taxonomies
Once created, your custom taxonomies will be available in the WordPress admin. To work with them:
Adding Terms
- In the WordPress admin menu, find your taxonomy name
- Click on it to view the terms management screen
- Add new terms just like you would add categories or tags
- For hierarchical taxonomies, you can set parent-child relationships
Assigning Terms to Content
- When editing a post of an associated post type, you'll see your taxonomy in the sidebar
- Select existing terms or add new ones
- For hierarchical taxonomies, you'll see checkboxes
- For non-hierarchical taxonomies, you'll see a tag-like interface
Important: Post Type Association
When creating a new taxonomy, it's crucial to associate it with the appropriate post types. If you create a new taxonomy and later want to associate it with additional post types:
- Edit the custom post type
- In the post type settings, find the "Taxonomies" section
- Add your custom taxonomy to the list
- Save the post type
This two-way association ensures that your taxonomy appears when editing posts of that type.
Creating Templates for Taxonomy Archives
With the WordPress Site Editor, you can create custom templates for your taxonomy archives:
- Go to Appearance > Editor (Site Editor)
- Click on the Templates tab
- Click Add New and select Taxonomy
- Choose your custom taxonomy from the list
- Design your taxonomy archive template using blocks
Using Taxonomies in Queries
Taxonomies are powerful for filtering content. You can use them with the Dynamic Query Block:
- Add a Dynamic Query Block to your page
- In the block settings, find the "Taxonomy Filter" section
- Select your taxonomy and the terms to filter by
- Configure other query settings as needed
Best Practices
Use descriptive names that clearly indicate the taxonomy's purpose
Choose hierarchical for category-like taxonomies with parent-child relationships
Choose non-hierarchical for tag-like taxonomies with flat structures
Limit the number of taxonomies to avoid overwhelming content editors
Associate taxonomies with relevant post types only
Consider URL structure when setting slugs
Create default terms for required taxonomies to ensure proper classification
Common Taxonomy Examples
Service Types Taxonomy
- Name: service_types
- Singular: Service Type
- Plural: Service Types
- Hierarchical: Yes
- Associated Post Types: Services
Locations Taxonomy
- Name: locations
- Singular: Location
- Plural: Locations
- Hierarchical: Yes (for region/city hierarchy)
- Associated Post Types: Services, Team, Events
Skills Taxonomy
- Name: skills
- Singular: Skill
- Plural: Skills
- Hierarchical: No
- Associated Post Types: Team, Projects
Troubleshooting
Issue | Solution |
---|---|
Taxonomy not appearing for post type | Verify the post type has the taxonomy associated in its settings |
404 errors on taxonomy archives | Flush permalinks by going to Settings > Permalinks and clicking Save |
Terms not saving | Check user capabilities and ensure the taxonomy is properly registered |
Hierarchical taxonomy showing as tags | Verify the "Hierarchical" setting is enabled |
Taxonomy terms not appearing in REST API | Ensure "Show in REST" is enabled for the taxonomy |