What is the best way to disable feeds per post type but keep has_archive enabled?
Leave a Reply
You must be logged in to post a comment.
What is the best way to disable feeds per post type but keep has_archive enabled?
You must be logged in to post a comment.
I ran into this issue today. I don’t know if it’s the best way, but here’s how I solved it (with
has_archive
still set to true, of course):Please note that this will cause all feeds to generate as RSS 2.0, when they do generate, but you get general idea.
I just got this working in a theme by checking if we’re on the archive page for an array of custom post types and then removing the feed link actions:
I haven’t tested, but it should be as simple as: