Translations of this page:

Custom Taxonomy

Magic Fields allows the creation of Taxonomies easily. These taxonomies are added to the exisiting Post Types in the system. If you want to know more about taxonomies visit the Taxonomies section of the codex.

To create a Taxonomy click on the menu link Magic Fields → Magic Fields.

This will show us the Post Types and custom Taxonomies dashboard, where we will see all the Custom Taxonomies in the Custom Taxonomies section that were created with Magic Fields.

Each of these Custom Taxonomies has the edit and delete options.

 


 

Create a Custom Taxonomy

To create a Custom Taxonomy go to the dashboard in the Custom Taxonomies section and click on the “Add new Custom Taxonomy” this will take us to the form to add a Custom Taxonomy

Just like the Post Types form we can divide the Custom Taxonomy form in 3 sections:

  • General information
  • Advanced options
  • Advanced label

General Information

In this section we will find the Custom Taxonomy data, the label and type fields are mandatory. Here is the detail for each field in this section.

  • Type : a string that only accepts numbers, letters and underscores, it must be unique, this will be the Custom Taxonomy's key. This will be the name registered in Wordpress.
  • Label : A singular descriptive name for the Custom Taxonomy.
  • Labels : A plural descriptive name for the Custom Taxonomy.
  • Description: A brief description of the Custom Taxonomy.
  • Post Types : We can choose which Post Types will be able to access the Custom Taxonomy, it must have at least one Post Type selected in order to be able to save.

When we save the changes Magic Fields will check that the required fields are not left blank and that the “Type” is unique, if this is not the case and the “Type” is already being used or the required fields are blank it will show a message.

Advanced options

Here we can find the advanced options of the Custom Taxonomy each option has an explanation. If you wish to know more about each of these options visit the register_taxonomy section of the codex.

Advanced label

In this section we will assign texts for each Custom Taxonomy. In the upper part there is a checkbox marked as “Suggested labels” if this checkbox is selected it will give us suggestions for each label, basing the suggestions on the field label in the general options. Watch this video of the behavior.

 


 

Edit a Custom Taxonomy

To edit a Custom Taxonomy just click on the “Edit Custom Taxonomy” in the dashboard. The form to edit the Custom Taxonomy is the same used to create it. If you have any doubts please go back to the previous section.

 


 

Erase a Custom Taxonomy

When you erase a Custom Taxonomy the reference to the Custom Taxonomy in Magic Fields will be deleted. The elements created with this Custom Taxonomy will still be kept in the Wordpress tables.

 


 

Using a Custom Taxonomy

Once a Custom Taxonomy is created we can see the taxonomies related with every Post Type selected.

If we click on the menu it will show us the administrator for that Custom Taxonomy, this is the same used with Categories or Tags.

When we create a Post Type element we will see a box with our Custom Taxonomy, depending on the options selected for that Custom Taxonomy is how it will be displayed.

In this case the taxonomy Book has the option of inheritance and magazine doesn't.

 


 

Additional Notes

If you want to know more about Custom Taxonomies it is advisable to visit these sites:

custom_taxonomy_v20.txt · Last modified: 2011/07/29 19:07 by bcorona