I trust that you found this blog post to be enjoyable. If you are interested in having my team handle your eCommerce setup and marketing for you, Contact Us Click here.

How to create custom taxonomy using ACF (Advanced Custom Fields) in wordpress

How to create custom taxonomy using ACF (Advanced Custom Fields) in wordpress

What is Custom taxonomy in WordPress:

Standard taxonomies may not meet the specific needs of an organization or project. Custom taxonomies enable the establishment of categories that are specifically tailored to the organization's or project's context, material, and process.

Why do we need to create Custom taxonomies

Creating bespoke taxonomies is necessary for a variety of reasons, the most important of which is to improve the structure, retrieval, and management of information to satisfy individual demands. Here are key reasons why custom taxonomies are necessary:

  • Address Unique Needs: Standard taxonomies may not meet the needs of a specific company or project. Custom taxonomies enable the construction of categories that are tailored to the organization's or project's specific context, material, and process.
  • Improve Searchability: Custom taxonomies provide for more specific categorization of content, making it easier for users to locate what they are looking for. Search results improve in accuracy and relevance when material is organized in a way that matches the specific terminology and structure useful to users.
  •  Enhance User Experience: Custom taxonomies simplify navigation and content discovery by matching the classification system with users' mental models and language. This leads to a better user experience since users can simply find and engage with the information they require
  • Facilitate Content Management: Custom taxonomies make it easier to organize and manage enormous amounts of content. This is especially valuable in content management systems (CMS), where bespoke taxonomies can improve content generation, tagging, and retrieval procedures.
  • Support Scalability: As an organization grows or its projects evolve, the need for more specific or additional categories may arise. Custom taxonomies offer the flexibility to scale and adapt the classification system without being constrained by predefined structures

 

In summary, custom taxonomies are created to tailor the organization, searchability, and management of information to the specific needs of users, enhancing overall efficiency, user experience, and strategic decision-making.

Here are the steps to create a custom taxonomy using the Advanced Custom Fields (ACF) plugin without any additional code:

  • Install the ACF (Advances Custom Field) Plugin: If you have not previously done so, install and activate the Advanced Custom Fields plugin on your WordPress site. It's accessible in the WordPress plugin repository.
  • Find the taxonomy  option: https://www.advancedcustomfields.com/resources/registering-a-custom-taxonomy// To create a custom post type in your WordPress website without using code, go to acf -> Taxonomies -> Add New.A custom taxonomy is a classification system that is specifically tailored to the demands of a certain project, organization, or user group. Unlike standard taxonomies, which contain predetermined categories and hierarchical structures, custom taxonomies are built to organize and categorize material, products, or data according to particular criteria relevant to the user's needs.

 

BASIC SETTINGS: The required fields of “Plural Label”, “Singular Label” and “Taxonomy Key” are the minimum required information to create a taxonomy, however, there are other settings available if you want to perform more granular configurations.

PLURAL LABEL:   The plural label refers to the name used to represent multiple items within the taxonomy. It helps provide clarity and consistency in the user interface when referring to collections of items categorized under the taxonomy

SINGULAR LABEL:     The singular label of a taxonomy refers to the name used to represent individual items within that taxonomy. It's the term used when referring to a single category or classification within the taxonomy.

TAXONOMY KEY:    The taxonomy key is a unique identifier for the custom taxonomy within the system. While it's automatically generated based on the singular label you provide, you have the option to change it to suit your preferences or requirements.

Automatically Generated: By default, the taxonomy key is generated from the singular label you enter during the creation of the custom taxonomy. This helps ensure that the key is relevant to the taxonomy's purpose and easy to recognize.

Customizable: Although it's generated automatically, you have the flexibility to change the taxonomy key if needed. This can be useful if you prefer a different identifier or if there are specific naming conventions you need to follow.

#POST TYPES:   Select one or more existing post types to connect the taxonomy to, so that objects of the post types can be classified with the taxonomy

PUBLIC:   This setting controls if the taxonomy is public or private. It is on by default, meaning the taxonomy shows in the admin dashboard and is publicly accessible on the site frontend.

HIERARCHICAL:  This setting controls the type of taxonomy when it comes to allowing parent and child relationships between taxonomy terms. The native WordPress Category taxonomy is hierarchical but Tags is not. It is off by default.

Advanced Configuration:

Advanced configuration settings for a custom taxonomy typically involve more nuanced options beyond the basic settings. These settings provide greater control and customization over how the taxonomy functions within the system. Here are some general advanced configuration options you might encounter:

  • Query Var: This setting determines the query variable used in URL queries to retrieve content associated with specific terms in the taxonomy. Customizing this variable can help create more user-friendly URLs. 
  • Meta Box (Admin UI): Enable or disable the meta box in the admin interface for associating terms with content. Disabling this feature might be useful if you prefer to manage term associations programmatically.
  • Update Count Callback: Customize the callback function responsible for updating the count of posts associated with each term. This can be useful for optimizing performance when dealing with large datasets. 
  • Sort: Define the default sorting order for terms within the taxonomy. Options typically include alphabetical order, term ID, count of associated posts, or custom sorting. 
  • Capabilities: Fine-tune the capabilities required to manage the taxonomy, such as creating, editing, and deleting terms. This allows for granular control over user permissions.
  • Show Admin Column: Choose whether to display a column for the taxonomy in the admin interface's list table for associated post types. Enabling this option provides quick access to taxonomy terms from the post management screen.
  • Rewrite: Further customize the URL rewriting rules for the taxonomy's permalink structure. This includes options for setting the slug, prefix, and hierarchical structure.
  • REST API: Configure additional settings related to exposing the taxonomy and its terms via the REST API. This includes options for controlling visibility, endpoints, and schema.
  • Publicly Queryable: Decide whether the taxonomy is publicly queryable, meaning it can be used in queries to retrieve content via the frontend or public-facing pages.
  • Hierarchical: Specify whether the taxonomy has a hierarchical structure. This setting is often determined during initial configuration but may be revisited for advanced customization.

 

These advanced configuration options provide greater flexibility and control over how the custom taxonomy operates within the system. They allow you to tailor the taxonomy's behavior to suit specific requirements and preferences, ensuring optimal performance and user experience.

Back to blog