 I've added a new post type to myfunctions.php and I've created a new custom post type which is a auto which is basically a car and I'm also running wukamas on my site which basically has a custom post type of products. I just want to quickly run to my site map and I've refreshed it and now I can see that I have an XML on my cars on my auto post type and I also have the products. Let's imagine that I didn't want to post my auto custom post type onto the site map. Maybe I'm just using it for reference in some other place inside my website. So what do you do? You need to write a little bit of code to get this out of your site map. So what we're going to do is we're going to go to our functions.php. We're going to use the new hook in WordPress which is a filter so add filter and the filter that I am looking for is actually called wp sitemaps underscore post underscore types and this is the one that will help me to remove my particular post type. Now with this I'm going to write a new function. I can either make it anonymous or I can write a proper function with a name and I'm going to call it remove auto CPT from XML site map. So I'll just add take a press on this so that we don't have any conflicts whatsoever. So I'll copy this name and I'm going to start writing the function here. Now remember that whenever we use a filter we're going to be picking something that we are filtering and then at the end of the day we have to return it. So in this particular case I'm going to be getting the post types. We can use any other name to tap this but this is the most descriptive and the first thing we need to do is return those post types. Now this is an array of data so if we want to remove our post types what we need to do is use the PHP function of anset. We need to pass in our post types but we're going to filter out in that array we are going to remove one thing. Now my custom post type is registered as auto so I'm going to put auto in here as the post type that I'm going to remove from my XML and I'll put a semicolon and that is all I need to do so I'm going to save this. Let's come back to our site map here and I'm going to refresh this and you'll see that we no longer have the auto post type showing up in the XML so maybe I also don't want the wukamas products to come in so I can just come here I'll just duplicate this line of code copy it add it here and all I need to do is add the registered name for the post type in this particular case wukamas uses products and the post type is actually called product if you look here at the bottom when I hover over product you will see that we have post type is equal to product so I'll update this file again and then you will see that we no longer have the post dash products showing up as an XML page so if you enjoyed this video please share it with a friend don't forget to subscribe and hit the notification bell to keep you updated with the new videos that will be coming out and let me know in the comments how do you feel about the new XML site map feature do you think it's helpful or will you be running with your SEO plugin enjoy your day