title: Exclude multiple post types from Yoast sitemap
body: <p>There is a solution offered by Yoast to exclude 1 post type from the xml sitemap that it generates, but it does not explicitly state how to exclude multiple post types..
  Here is the way they suggest you exclude 1 post type:</p>
  <pre><code>/**
   * Exclude a post type from XML sitemaps.
   *
   * @param boolean $excluded  Whether the post type is excluded by default.
   * @param string  $post_type The post type to exclude.
   *
   * @return bool Whether or not a given post type should be excluded.
   */
  function sitemap_exclude_post_type( $excluded, $post_type ) {
      return $post_type === 'recipes';
  }
  
  add_filter( 'wpseo_sitemap_exclude_post_type', 'sitemap_exclude_post_type', 10, 2 );
  </code></pre>
  <p>See the <a href="https://developer.yoast.com/features/xml-sitemaps/api/" rel="nofollow noreferrer">original documentation here</a></p>