 Welcome back to the channel. Yesterday we were dealing with a couple of things where we were removing all these different menu items using a plugin and today I'm going to talk about how to clean up your dashboard. So we have a number of these widgets that are located whenever we log in into a word press or classic press and we find that this can be confusing even for a customer that we give a website. So today we are going to have them removed from our control panel. So I went to the wordpress codec site which is a codex.wordpress.org and there is what we call the dashboard widgets API and with this we are able to create new widgets of our own and then we are able to add a couple of different widgets to do different things generally. So there is one thing that is key here is that you have to have a widget ID and that's how you add a widget item. However you can also remove the dashboard widgets by using the remove meta box and then you add this is the ID of that widget and where it's located and whether it has a particular location and you can remove this by using the remove meta box and then by adding the address you add the ID of that particular widget. So what we're going to do is I'm just going to copy all this code right here and then I'll drop it in our editor. So this was the code we used to remove particular menu items actually if we look in our dashboard if we had restricted this to the editor. So I'm going to add this and what it does here is that it's adding an action whereby if we initialize the admin section we are going to run this function which is called remove dashboard meta and it will remove the different meta boxes that with these particular IDs. So let me quickly run let me quickly run to to to our dashboard and if we right click here and then go to inspect we are able to see the particular IDs of these boxes. So I'll just go all the way up we'll see that this this section is called our dashboard widgets but we have this particular widget which is called our dashboard right now with ID. If we go to this we have dashboard activity which is this then we have the others that keep on coming down like we have also dashboard underscore petitions and this is only found in a classic press it's not in word press because this is how classic press shares what they are doing or how they're getting people to vote in what features should be on their particular code of classic press. So what we're going to do is go back to our editor and save this when we save this and then reload our page here in our bit section we'll see that we only have two widgets that are left here because these are not by default part of word press. So we need to find their particular IDs we need to find a particular ID so we saw this one earlier was called a dashboard underscore petitions. So I'm also going to look for this one which is for word fence and whether we got word fence is a security plugin that I installed on almost all my installs of classic press or word press and we'll find that its ID is wordfence underscore activity reports. So what we're going to do here is I'm going to edit this so that I can just copy this without error so I'm going to copy it come back in my code and then I'll duplicate this and just change the name of this and say if I reload my admin area we'll see but actually that goes away it's no longer killing me and I can do the same for this classic press item and I'll just go for dashboard petitions and when I save this and then reload here we'll see that it also goes so we have a clean dashboard all here so I can imagine where we have a number of these items going so let me just remove a couple of things too let me just comment this out here and then save and we'll see so we'll look at the posts we'll look at the tools and settings because those are the items we took out and when we reload this is becoming a lot cleaner and easier to use so if I want I can also remove these users and make it a lot cleaner users and reload so we are able to see that this dashboard is becoming cleaner so I'll just clean out the rest of the things but we see how this looks like so once we save this particular things that we've put in here when we go back and reload our webpage here you see that it's becoming a lot cleaner nicer so the only things that I left to remove would be maybe these security features and we can have we can always have if I just go to the dashboard I'll be able to find a clean dashboard I'll be able to find all these different pages so I can use this space it's looking a lot cleaner I can use this in the custom software if need be so thank you for watching if you love the video please share it with other people subscribe to the channel and don't forget to hit that notification bell whenever new videos are out so enjoy your coding and enjoy using your CMS in its field