[wp-trac] [WordPress Trac] #43746: Custom post type single post feed returns a 404 if has_archive is set to false when calling register_post_type()

WordPress Trac noreply at wordpress.org
Thu Apr 12 13:58:17 UTC 2018


#43746: Custom post type single post feed returns a 404 if has_archive is set to
false when calling register_post_type()
--------------------------+-----------------------------
 Reporter:  henry.wright  |      Owner:  (none)
     Type:  defect (bug)  |     Status:  new
 Priority:  normal        |  Milestone:  Awaiting Review
Component:  Feeds         |    Version:  4.9.5
 Severity:  normal        |   Keywords:
  Focuses:                |
--------------------------+-----------------------------
 When using {{{register_post_type()}}}, the single post feed returns a 404
 if {{{has_archive}}} is set to false. This seems to happen regardless of
 the value of {{{feeds}}} in the {{{rewrite}}} array. For example:

 {{{
 register_post_type(
     'example',
     array(
         'rewrite'     => array( 'slug' => 'my-custom-post-type', 'feeds'
 => true ),
         'has_archive' => false
     )
 );
 }}}

 {{{
 $ curl -IL https://example.com/my-custom-post-type/some-text/feed/
 HTTP/1.1 404 Not Found
 }}}

 I'd expect a feed for the post to be built if {{{feeds}}} is set to
 {{{true}}}.

 Note I have flushed permalinks.

-- 
Ticket URL: <https://core.trac.wordpress.org/ticket/43746>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform


More information about the wp-trac mailing list