At this point you should have a tassonomie-custom/completely empty folder! All you have to do is create a file index.phpand leave it empty (for security reasons) and then create the file tassonomie-custom.phpinside which you will put the plugin header:
PHP
1
/*
2
Plugin Name: This is where the name of the plugin goes.
3
Plugin URI: http://plugin_documentation_page_url_here
4
Description: A short description that will be displayed in the list of pakistan consumer email backend.
5
Version: 1.0
6
Author: Name of the plugin author
7
Author URI: http://url_of_your_personal_site
8
License: GPL2 (or 3 is fine)
9
*/
This is the classic information that we pass to our WordPress to ensure that it is able to discover our plugin and allow us to install it through the interface present in the dashboard of this platform.
Obviously for our purposes it will have to be slightly different, so why don't you modify the previous code block with those related to the project we are developing?
Using a lot of imagination, I managed to create something like this:
PHP
1
/*
2
Plugin Name: Custom Taxonomies
3
4
Description: This plugin allows me to add new taxonomies for my articles and CPTs
5
Version: 0.1
6
Author: Andrea Barghigiani
7
8
License: GPL2
9
*/
Well, we've come to the point where we really get down to business and start to understand how we can create our own custom taxonomy. To do this, you'll need to learn how the function behaves register_taxonomy(), which, much like register_post_type(), works closely with configuration arrays.
But let's not talk too much, let's go straight away and see its syntax.