Video sitemap doesn’t work when I have Custom Post Type ‘Video’?
Version 3.5.X and Newer
Yoast SEO: Video will automatically detect a naming collision and change the video sitemap name. Please go to Admin > SEO > Video SEO and click the 'XML Video Sitemap' link to get the correct sitemap URL. If you prefer to give your video sitemap a custom name, please use the developer filter discussed below.
Version 3.4.X and Earlier
If you have a Custom Post Type called 'Video', it might be possible that your video-sitemap.xml returns an error (404). This can be resolved by using the developer filter discussed below.
How to Change the Video Sitemap URL
- Disable all sitemaps by unchecking the sitemap box shown in this article.
- Add the following to your functions.php file.
define ('YOAST_VIDEO_SITEMAP_BASENAME', 'vsvideo');
- Enable all sitemaps by following the steps in this article.
This will create two sitemaps; one for the video custom post type and one specifically formatted to meet video sitemap guidelines.