To add custom URLs to the sitemap in WordPress, you can use the Yoast SEO plugin.
- Install and activate the Yoast SEO plugin.
- Navigate to SEO > General in the WordPress dashboard.
- Click on the Features tab.
- Under the Advanced settings pages, enable the option for "Custom Post Types."
- Navigate to the Custom Post Types tab and click on the "Add custom Post Type" button.
- Fill in the details for the custom post type, such as its name and how it should be displayed in the sitemap.
- Click on the "Save Post Type" button.
- Navigate to the Yoast SEO » XML Sitemaps page.
- Click on the "Post Types" tab.
- Find the newly created custom post type in the list and ensure its "Excluded" status is set to "No."
- Click on the "Save changes" button.
- Yoast SEO will now include the custom post type URL in your sitemap.
You can repeat this process for any additional custom post types you want to add to the sitemap.