 Welcome back to the channel Last we left off we had created our post type of villages and that's what we'll be storing information in our custom post type and right now we still have a couple of issues coming up when we try to add a new village we see that it still says new post here and we have taxonomies that will be coming up there not yet here so we're going to build on that today so what we're going to learn in our lesson today is how to change these particular elements here to change them to be called villages also just like our custom post type we're going to add a number of labels and then we shall advance to add on some taxonomies today so let's go into we see if the labels that are growing will be having more information coming in our array here so what I'm going to do is I'm going to spread out this particular piece of code and I'm going to use the basics of PHP that is I'm going to use what we call variables and that is I'll have a variable that starts with the dollar side now give it a name and call it label and this will store our labels array right here so I'll just cut this from here test it here of course terminate that and then I'll allow the label to be referenced here which will allow us as we add more label fields into our element here everything will be a lot cleaner so just run this here just to make it simple and easy and then what I'm also going to do here is I'm going to get this array of items right here and I'm going to call it arguments for our sexual also run it into a variable and then terminate that here and then I'll be able to reference it here as arguments so we're just going to do a little cleanup here and then this and leave it on one line if I save this I'm actually go back to our browser refresh everything is still fine nothing is broken the next thing that I'm going to do right now is that you'll find that I'm repeating most of these texts so I'll also just save them in a variable so I'll have a plural name which I'll call villages and put a semicolon at the very end and then I'll just duplicate this to have a singular name so when we save that I'm just going to get the plural name to go wherever we have villages here and just save that and then I'll just get also the singular name to go where we have the village here so save this always test your code see that nothing is broken and yeah no major changes in here so quickly just place those in and then I'll explain what they do actually mean so I'm just going to get those from code snippet that I did here once I save this I'll just explain this so in our labels we've added our name which was already there we have a singular name for the post type we have a menu name what will appear in the menus will be for the parent the parent name and then we have all the items will be called by the plural name which is villages whenever we save view or view item we'll also add that to that whenever we add a new item we'll see this coming up we'll see the edit whenever we click edit or edit item we'll see that so I'm just going to reload here when we reload we see that we'll add a new village right here when we go to the villagers section we're able to see village add a new village this would be very bad grammar not village found but we can actually just correct that by coming here and saying no village found so we'll just come here and reload here so we have no village found we have this if we try to search we'll probably get the no village sign so I think this is a very good step for us when we come here we can add a new village in our menu and if we go into our menus we're going to be able to find the villagers I'll just go to the screen options to see that we also have the villagers tagged in there so once I come here we see that we can add villagers to our menu let's say if we had content and this is made available by what we add in our arguments here we say we shall add it in the navigation menus we shall add it in the menu we shall add it in the administration bar and then we shall we shall allow the hierarchy for formatting like there will be a level of hierarchy for this particular post type then we shall also allow it to be exportable by the users if they want to export the information we'll also have it archived we shall allow it to be searched we shall give it a false query in terms of search but we'll also allow the public to query it publicly anyone can query for this information or we can write in our theme then we shall give it a menu position of 18 which is about just below the media section and above the pages so while we are talking about this particular menu position I am thinking you might be wondering how do I get this number it's not something that I guest up when you go to the docs and you look at her the add menu page functionality in WordPress it also requires a particular position here as a default argument so quickly if you scroll down to the end if you scroll down you'll find that there is a menu structure of the numbers that have already taken up so you cannot apply it to because that's a dashboard location post takes up number 5 10 is for media links is at 15 and then we have pages at number 20 so me having a number between 15 and 20 is actually very ok if I want position it that way and that's why I want to put my villagers if I wanted to put it under pages or comments I'll put it between 20 and 25 and the same goes for all the others so if you don't add a menu position in your code like right here if you don't add a menu position then automatically your post type is going to be pushed at the end just after settings then the next thing we shall do is that we are going to give it a very nice icon which is a palm tree icon coming from dash icons that is a default font that is in a classic press or in wordpress so we have our palm tree coming up here remember it was before we had a pin just like the posts and by default we get that pin however we've changed it to the palm tree so to have all that information there so I would say most of the information we need for our post type is actually done the only thing that I would like to talk to you about is the supports when you add an argument of supports you remember whenever we come to our if we go to I'll just add a new village whenever we go to our posts we have a couple of things so this is our title, we have the editor here we have custom fields showing up here we have discussions and author and a number of things that we can turn off in our screen options if we wanted to explicitly say you know what we're not going to support maybe the title and author and custom fields so I'll just take out the comments custom fields and author for a start to show you what I mean so if I save I'm explicitly saying this particular post type of villages is not going to have this information however it will have the title it will have the editor and it will have the thumbnail which are already here so if we go to our screen options we'll find that we only have just the featured image showing up only so we can decide to say you know what we also don't need the editor for now so maybe we'll just take it out and maybe at an eventual date we'll probably want the editor so if I save this and come here and reload we're going to see that our editor is gone so just have the village title and we have these items here so I think we are good to go now we shall be looking at the taxonomies and that's basically what we have in post like categories or tags you can register your own taxonomies and we're going to actually register something that is new we shall register our districts we shall register our sub parishes and all the other information and we'll make it available all this information that we've been putting here can actually be found when you go to the codex of wordpress that is codex.wordpress.org and you look for the register post type functionality so you'll be able to see what post types are reserved automatically by wordpress and then you can see this particular labels that we actually using here and that you can set up there are more that we haven't added like uploaded to this item ABC and you can actually look this up and find out more information about what we've been discussing in this particular tutorial and this particular chapter of our development so if you like this video please give it a thumbs up right there in the video or if you have any questions please feel free to drop them in the comment section and subscribe to the channel I encourage you to subscribe because you don't want to miss out on updates as we go in our series or any other series that we shall be starting up in the future thank you for watching have a good time