disable /feed/ for custom post type
Our custom post type posts have an extra feed in their source code:
www.example/post-type/post/feed/
I want to remove the extra /feed/
from our CPTs, as they generate 404s.
From the register_post_type function reference, I've tried adding 'rewrite' = array('feeds' = false),
to:
register_post_type('templates',
array(
'labels' = array(
'name' = __( 'Templates' ),
'singular_name' = __( 'Template' ),
'add_new' = __( 'Add New' ),
'add_new_item' = __( 'Add New Template' ),
'edit' = __( 'Edit' ),
'edit_item' = __( 'Edit Template' ),
'new_item' = __( 'New Template' ),
'view' = __( 'View Template' ),
'view_item' = __( 'View Template' ),
'search_items' = __( 'Search Templates' ),
'not_found' = __( 'No Templates found' ),
'not_found_in_trash' = __( 'No Templates found in Trash' ),
'parent' = __( 'Parent Templates' ),
),
'public' = true,
'show_ui' = true,
'exclude_from_search' = true,
'hierarchical' = true,
'supports' = array( 'title', 'editor', 'thumbnail','page-attributes' ),
'rewrite' = array('feeds' = false),
'query_var' = true
)
);
}
but this has not resolved the issue.
Help appreciated.
Topic feed custom-post-types Wordpress
Category Web