Custom fields in categories and taxonomy

Previously, I already wrote in various lessons about custom fields, creating data types and taxonomy, also wrote about the wonderful paid set of plugins which can do this without interfering with the WordPress code and works entirely on the built-in API. However, I noticed one flaw in the plugin, we can perfectly create custom fields for individual post types, but there is no way to create custom fields for taxonmy in custom types or categories in posts. This flaw is expected to be fixed in the near future., but for now I decided to offer a plugin for my readers Ultimate Taxonomy Manager which could be a great addition..

The plugin helps solve the problem with pinning an image to a rubric. The plugin currently has 3 field types (picture, text field, combo box).

Installing and configuring the Ultimate Taxonomy Manager plugin

  1. First you need to download the plugin from the WordPress repository “Ultimate Taxonomy Manager“;
  2. activate the plugin;
  3. go to the admin panel section "Settings” -> “Taxonomy Manager“;
  4. in the settings tab "Custom Taxonomies” you can add a new taxonomy;
  5. on the tab "Custom Taxonomy Fields” you can set up additional fields for your taxonomy;

Setting up a new taxonomy

If you have gone to plugin settings “Custom Taxonomies” to tab “Custom Taxonomy Fields“, then you will see the basic taxonomy settings, if you are familiar with the WordPress API, you can open and configure additional options “Additional Options“.

Ultimate Taxonomy Manager произвольные поля wordpress

In the next window you can:

  1. Give the taxonomy a name (must be in English and in small letters, without spaces);
  2. Select standard data type (pages, records) or arbitrary (created by you), for which you are creating a taxonomy (it could be news categories, streets for ads or deal type);
  3. Go to more extensive additional settings “Additional Options”.

Additional plugin settings

We won't consider them all., we will focus only on the main.

  • Label of Taxonomy – the name of the menu item for the taxonomy;
  • Show as ComboBox - exposes 2 the type of metabox in records

Ultimate Taxonomy Manager metabox

 

The main difference is, that in the first case, the user has the opportunity not only to choose, but also add terms, and in the second can only choose one of the proposed.

  • Slug – when you select a category on the blog, you see the word /category/news/ in the link, for taxonomy, you can insert your servants in the link /{slug}/news/ (write only in English, without spaces and with small).
  • Hierarchical - indicates, whether the taxonomy will be hierarchical like categories or non-hierarchical like tags.

Ultimate Taxonomy Manager Hierarchical taxonomy

Other settings, if interested, see for yourself, but it will already be for more advanced WordPress developers.

After creating the taxonomy

After creating the taxonomy, you will be able to see the result in the left menu and on the post page.

New Taxonomy in WordPress Menu

 

Adding a taxonomy to a post

Filling the new taxonomy and custom fields

If, after creating a new taxonomy, we go along the “Posts” path -> "Taxonomy", then we will see all the same fields as in the categories.

new wordpress taxonomy

To create additional custom fields, go to the menu “Settings” -> “Taxonomy Manager” and select the tab “Custom Taxonomy Fields“. In the window that appears, select our taxonomy and click the “Manage“.

In the picture below you can see what the fields look like:

add taxonomy image field wordpress

 

To add a field, you just need to specify the Field Name, Field Label, Field Type. After pressing the button Add Custom Field the name of your custom field will appear on the right in the list. To check the work done, go to the menu “Recording” -> “Taxonomy” and at the very bottom of the list of fields you will see a new field for adding a picture. You can also add fields for standard headings.

add taxonomy image field wordpress

This lesson ended, good luck with website development.


Buy WordPress hosting
/* WordPress tutor
Online tutoring services. List of courses I teach
  • Basic web design course;
  • Site layout;
  • General course on CMS WordPress and continuation of the course on template development;
  • Website development in PHP.
Read more on the page WordPress tutor
*/

Nikolaenko Maxim

Director of web studies ProGrafika. I am developing, website design and promotion. Always glad to new blog readers and good clients.


You may also like...

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.

Templates for WordPress
The best hosting in Ukraine
Stable hosting for Drupal