what-are-WordPress-taxonomies

A Guide to WordPress Taxonomies and Permalinks Settings

Chances are high that you already saw or used both Taxonomies and Permalinks but don’t notice that they are named Taxonomies and Permalinks.

If you’re thinking biology, you’re correct. But taxonomies have a slightly different meaning in WordPress.

The basic ideas behind WordPress Taxonomies are identical. Since the two fields are completely different, the practical application of taxonomies also differs to a great extent. Well, let us unfold the mystery right away.

Taxonomies are tags and categories used in WordPress to group or categorize the post types of your website. And permalinks are permanent links or URLs that work as the address of your posts and pages.

Sounds familiar, right? There are a few more components of WordPress taxonomies and permalinks. You will find all of them explained in the following sections with examples.

Let’s start with Taxonomies!

A Bit About Taxonomies in WordPress

Taxonomy is the branch of science/biology that deals with the identification, classification, and nomenclature of organisms. This term acquired a different meaning in the realm of WordPress.

It refers to a less complex idea here. WordPress taxonomies are a method of labeling the type of WordPress posts.

Let us explain it in a simple manner. Suppose you have a blogging website that mainly focuses on travel and tourism. You post blogs on different tourist spots around the world.

Hills, oceans, heritage sites, continents, countries, etc. are a few areas you cover. These are actually the categories of the posts you publish in WordPress. You can also add relevant tags to each of these posts.

To cover hills and mountain-related posts, you can use tags such as hill, nature, landscape, travel, photography, mountains, sky mountain, travel photography. So, grouping a few related posts under a tag is actually a practice of WordPress taxonomies.

Hopefully, now you are clear about what are taxonomies in WordPress. and we are going to cover both of the types-

  • WordPress Default Taxonomies
  • WordPress Custom Taxonomies

Let’s jump into details.

Default Types of WordPress Taxonomies

WordPress provides a few taxonomies by default. Here we are going to cover 4 types of default WordPress taxonomies.

  1. Category
  2. Tag
  3. Link_category
  4. And post_format

Category, tag, link_category, and post_format are the taxonomies that need no use of PHP, CSS, and HTML coding.

Let’s check a few examples for each of the taxonomy types.

1. Category

Category taxonomies help you as WordPress users to identify the post types with ease. You can group a specific type of post under a suitable category.

WordPress Categories - default taxonomies

You will find the categories option on the right side of your WordPress editor. Click on the Settings icon to open the available options. You may need to scroll down a little bit to get the categories

You can also add a parent category and name a few sub-categories under it. We’ll show how to create and display them in a later part of this post.

2. Tag

Tags are close to categories in terms of the grouping attribute. It conveys extra information about a category and a post to the readers. Consider WordPress as a category and responsive theme development, e-commerce plugin development, website builder, blogging websites, etc. as tags.

tag- default WordPress taxonomies

It implies that the categories deal with a broad idea, whereas tags depict the smaller topics that the specific idea comprises.

Like the categories option, tags are also available on the right side of the WordPress blog editor interface.

3. Link_category

Most people don’t notice that WordPress has an effective system of categorizing the URL based on a few common settings. Even you can customize a URL using the default options available on WordPress.

link-category- default WordPress taxonomies

For example, if one of your blogs has a slug like wptest.com/mountains/everest, it means that you’re writing about mountains. This is named link_category.

This is also a form of taxonomy.

4. Post_format

You can categorize WordPress posts based on their types such as standard, image, video, quote. link, audio, and more.

post-format-  default WordPress taxonomies

This option is available under the writing settings menu of the dashboard. You can choose the right post format as you see fit from the dropdown menu.

How to Display 4 Default WordPress Taxonomies

Category: You can simply add a category to your posts by using the WordPress dashboard. Go to Posts and select Categories.

Adding a category to WordPress

There are four options for you, check the above image.

  • Name– Give your category a name.
  • Slug– select a short and SEO-friendly slug that will be added to your post URL.
  • Parent category– Decide whether it will be a parent category or a subcategory under another parent category.
  • Description– You can add a description for the category that will help both your content team and search engines to know a bit about your category. This is optional. The first three are very important to customize.

Tags: Go to the dashboard menu, hover your mouse on Posts, then choose Tags, and complete the blank input field provided by WordPress. This is not mandatory like the Category option.

adding tag to WordPress
Adding a tag to WordPress

You can create new tags from the blog editor. Go to the right sidebar of the page and type the new tags you want to add. You can select any of the suggested tags too if that fits with the context of your blog.

Simply put a comma between two tags or press the enter key to use more than one tag and separate them from one another.

How to Add Custom Taxonomies in WordPress

Your business or blogging website may need to use more taxonomies than just tags and categories. You can’t add Custom Taxonomies without the help of additional plugins or manual coding. I mean there are two ways for you-

  1. Add Custom Taxonomies using a plugin
  2. Add Custom Taxonomies using manual codes

Using a plugin is always easy if your site is already not so crowded with a bunch of plugins. And you can go for coding if you feel comfortable that way. Let’s see the ways.

Adding Custom WordPress Taxonomies with Plugins

WP User Frontend Pro is one of the most powerful yet easy WordPress plugins that can help you create custom posts and associate them with custom taxonomies.

You can add or edit the taxonomies as per your requirements.

Install and activate the plugin at first from wordpress.org or you can buy the pro version from here.

Once the plugin is active you can easily create customer taxonomies by following this Complete Guide To WordPress Custom Post Types.

Adding Custom WordPress Taxonomies with Codes

Both hierarchical taxonomy (category) and non-hierarchical taxonomy (tag) can be added with the help of coding. Only a few lines of coding are enough to create custom taxonomies on WordPress.

You need to notice carefully to add the coding lines as codes for hierarchical taxonomy are different from the non-hierarchical ones.

Go to your WordPress theme directory and click on the functions.php file to edit it. Paste the following codes right below the existing codes to create a new hierarchal taxonomy named- ‘Subjects.’

//hook into the init action and call create_book_taxonomies when it fires
 
add_action( 'init', 'create_subjects_hierarchical_taxonomy', 0 );
 
//create a custom taxonomy name it subjects for your posts
 
function create_subjects_hierarchical_taxonomy() {
 
// Add new taxonomy, make it hierarchical like categories
//first do the translations part for GUI
 
  $labels = array(
    'name' => _x( 'Subjects', 'taxonomy general name' ),
    'singular_name' => _x( 'Subject', 'taxonomy singular name' ),
    'search_items' =>  __( 'Search Subjects' ),
    'all_items' => __( 'All Subjects' ),
    'parent_item' => __( 'Parent Subject' ),
    'parent_item_colon' => __( 'Parent Subject:' ),
    'edit_item' => __( 'Edit Subject' ), 
    'update_item' => __( 'Update Subject' ),
    'add_new_item' => __( 'Add New Subject' ),
    'new_item_name' => __( 'New Subject Name' ),
    'menu_name' => __( 'Subjects' ),
  );    
 
// Now register the taxonomy
  register_taxonomy('subjects',array('books'), array(
    'hierarchical' => true,
    'labels' => $labels,
    'show_ui' => true,
    'show_in_rest' => true,
    'show_admin_column' => true,
    'query_var' => true,
    'rewrite' => array( 'slug' => 'subject' ),
  ));
 
}

Paste the following codes, to create a non-hierarchical taxonomy named ‘Topics.’

//hook into the init action and call create_topics_nonhierarchical_taxonomy when it fires
 
add_action( 'init', 'create_topics_nonhierarchical_taxonomy', 0 );
 
function create_topics_nonhierarchical_taxonomy() {
 
// Labels part for the GUI
 
  $labels = array(
    'name' => _x( 'Topics', 'taxonomy general name' ),
    'singular_name' => _x( 'Topic', 'taxonomy singular name' ),
    'search_items' =>  __( 'Search Topics' ),
    'popular_items' => __( 'Popular Topics' ),
    'all_items' => __( 'All Topics' ),
    'parent_item' => null,
    'parent_item_colon' => null,
    'edit_item' => __( 'Edit Topic' ), 
    'update_item' => __( 'Update Topic' ),
    'add_new_item' => __( 'Add New Topic' ),
    'new_item_name' => __( 'New Topic Name' ),
    'separate_items_with_commas' => __( 'Separate topics with commas' ),
    'add_or_remove_items' => __( 'Add or remove topics' ),
    'choose_from_most_used' => __( 'Choose from the most used topics' ),
    'menu_name' => __( 'Topics' ),
  ); 
 
// Now register the non-hierarchical taxonomy like tag
 
  register_taxonomy('topics','books',array(
    'hierarchical' => false,
    'labels' => $labels,
    'show_ui' => true,
    'show_in_rest' => true,
    'show_admin_column' => true,
    'update_count_callback' => '_update_post_term_count',
    'query_var' => true,
    'rewrite' => array( 'slug' => 'topic' ),
  ));
}

Check the below before and after pictures to see how they appear in the backend of the WordPress dashboard.

Before: Look at the blank space as marked

Add Custom WordPress Taxonomies with Codes

After: Two new taxonomies are visible after applying the codes manually.

Add Custom WordPress Taxonomies with Codes
WordPress permalink structure
WordPress permalink settings

Permalink refers to a static single web address that is explicitly assigned to a specific web resource such as a web page, blog post, or file that will continue to point to that same resource over time. Permalinks are permanent links or URLs.

The advantages of a permalink cannot be overemphasized, without a permalink, it will be impossible to link to other websites or contents. Permalink enables users to share posts, link to posts, and make the user experience easy.

For permalink, the URL has to be permanent and must not change.

The permalink settings enable users to make specific changes and to create a custom permalink structure. By default, WordPress uses the plain permalink structure, however, you can make custom changes to the permalink structure of your posts or pages. Permalinks are mostly used to improve the usability, aesthetics, and forward compatibility of your WordPress site links.

Permalinks come in the following 6 formats:

  1. Plain– This is the default WordPress permalink structure and it is usually represented by http://www.yoursite.com/?p=123
  2. Day and name– This is the type of permalink that reflects the date (Year, Month, and Day) It is an example of the day and name-based structure is http://www.yoursite.com/2019/09/11/sample-post/
  3. Month and name– This type of permalink reflects the year, month, and name Eg http://www.syoursite.com/2019/09/sample-post/
  4. Numeric– The permalink has a numeric structure in its URL http://www.yoursite.com/archives/123
  5. Post name– This permalink has the post name or title in the structure and http://www.yoursite.com/sample-post
  6. Custom structure– the custom type permalink allows you to create a custom-based permalink by creating a custom permalink structure. An example of a custom permalink is- http://www.yoursite.comblog/%year%/%monthnum%/%day%/%postname%/. For the custom structure, other tags available are- %hours%, %minutes%, %seconds%, %post_id%, %category%, %author%.

WordPress also allows you to set a permalink for individual pages and posts on your WordPress site when creating or editing a post. This can be done in the permalink field of the content page of your WordPress dashboard.

Learn how to perfectly set up and customize permalinks in WordPress in detail-

FAQs About WordPress Taxonomies

Hope now you know everything about WordPress taxonomies. In case we missed anything, here are the answers to a few most asked questions for you.

What should I use? Categories or Tags?

The main difference lies in the application of these two taxonomies. Categories are required for each post whereas tags are optional.
If you don’t use a category for WordPress posts, the post will be labeled automatically as “Uncategorized”.
Usually, a post falls under a single category but you can add 5-10 tags for each post.
If you want to refer to a broader area that covers your topic, you should use a category. If you want to convey additional information about a topic, you can use tags.
For example: If “Hollywood Movies” is a category, Tom Cruise, Tom Hanks, Leonardo Decaprio, etc. are a few tags.

Is it possible to create custom taxonomies without using codes?

Yes, you can use the Custom Post Type UI or WP User Frontend plugin to create custom taxonomies without using codes.

  • Can I use multiple categories for a post?
  • Yes, you can. But remember that you need to write on a niche topic and present comprehensive information about that. It’s not wise to merge more than one category in a post. This practice implies that your research lacks depth.

  • Are taxonomies good for SEO?
  • Think of this as a user. Taxonomies tell additional info about a post and readers find it useful to search a topic based on the categories and tags. This surely improves the user experience and consequently affects the SEO health of a website.
    Besides, taxonomies are a systemic and organized way of grouping different types of posts. It eases the website navigation process for search engines.

  • Can I publish a non-category post without labeling it uncategorized?
  • No. WordPress will automatically keep it under the uncategorized category.

    Final Thoughts on WordPress Taxonomies and Permalinks

    Simply put, taxonomies are effective ways of classifying articles, blogs, media posts, and any other content published in WordPress. WordPress Taxonomies help you group similar things together to enhance the navigation experience for your readers.

    WordPress Permalinks are permanent links or URLs that work as the address of your post, page, or file by which users come to your site. You need to carefully customize your permalink structure as it can’t be changed later.

    Both taxonomies and permalinks help you make your user journey and navigation easier and smoother.

    And if your readers are satisfied, you can get more and more conversions. That’s the purpose of using taxonomies and permalinks in WordPress.

    Did we miss anything? Do let us know by commenting.

    Similar Posts

    Leave a Reply

    Your email address will not be published. Required fields are marked *

    This site uses Akismet to reduce spam. Learn how your comment data is processed.