The codex page for register_post_type seems to suggest that it should be possible to disable feed generation for custom post types:
rewrite
(boolean or array) (optional) Triggers the handling of rewrites for this post type.
To prevent rewrites, set to false.
...
$args array
...
'feeds' => bool Should a feed permalink structure be built for this post type.
Defaults to has_archive value.
I read that as meaning this:
register_post_type('People', array('rewrite' => array('feeds' => false)));
would result in my 'People' archive page not having this:
<link rel="alternate" type="application/rss+xml" title="My Site » People Feed"
href="/" />
in its head. However, the above is output in the HTML. Have I misunderstood, or done something wrong? I do not want a feed to be generated.
Any help much appreciated.
Toby
The codex page for register_post_type seems to suggest that it should be possible to disable feed generation for custom post types:
rewrite
(boolean or array) (optional) Triggers the handling of rewrites for this post type.
To prevent rewrites, set to false.
...
$args array
...
'feeds' => bool Should a feed permalink structure be built for this post type.
Defaults to has_archive value.
I read that as meaning this:
register_post_type('People', array('rewrite' => array('feeds' => false)));
would result in my 'People' archive page not having this:
<link rel="alternate" type="application/rss+xml" title="My Site » People Feed"
href="http://mysite.com/people/feed/" />
in its head. However, the above is output in the HTML. Have I misunderstood, or done something wrong? I do not want a feed to be generated.
Any help much appreciated.
Toby
In case it helps anyone...
I had misunderstood - the feeds argument of 'rewrite' was merely about the formatting of feed URLs (to use rewriting).
What I want is not to have a feed URL output in the <head>
of my custom post type pages. The only way I have found to do this, is using
remove_action( 'wp_head', 'feed_links_extra', 3 );
although this will suppress the feed in other circumstances (categories etc), not just for my custom post type. If anyone knows how to do what I want I'd love to hear from you!
Toby