Support » Plugin: Yoast SEO » Remove custom post type single from sitemap but leave archive

  • Resolved Jason Adams

    (@jason_the_adams)


    Periodically it makes sense to have a custom post type that has an archive but no single. Often this means I want to pull it from around the site, but also have a page that shows all of them at once (e.g. testimonials). Unfortunately, while WordPress has a has_archive option for post types, it doesn’t have a corresponding has_single option.

    That said, Yoast doesn’t have a good way of identifying whether the CPT single should show up in the sitemap or not. What’s the best way of communicating to Yoast SEO to not display all of a CPT’s singles? Is there a filter or something?

    Thank you!

  • The topic ‘Remove custom post type single from sitemap but leave archive’ is closed to new replies.