[wp-trac] [WordPress Trac] #46227: Add Rel-Feed Link to Header

WordPress Trac noreply at wordpress.org
Mon Jul 22 23:35:01 UTC 2019


#46227: Add Rel-Feed Link to Header
-------------------------------------------------+-------------------------
 Reporter:  dshanske                             |       Owner:  (none)
     Type:  enhancement                          |      Status:  reopened
 Priority:  low                                  |   Milestone:  5.3
Component:  Feeds                                |     Version:
 Severity:  trivial                              |  Resolution:
 Keywords:  has-patch has-unit-tests dev-        |     Focuses:
  feedback needs-testing 2nd-opinion             |
-------------------------------------------------+-------------------------

Comment (by garrett-eclipse):

 Thanks @dshanske I appreciate you feeding back there.

 So I understand a bit more the issue here and make sure I'm on the same
 page...

 In a default WP install with a Homepage, which isn't the posts page, that
 homepage already has a link to the feed - `<link rel="alternate"
 type="application/rss+xml" title="Rel Feed ยป Feed" href="http://rel-
 feed.local/feed/">`. This is a `rel="alternate"` link but should instead
 be updated to a `rel="feed"` throughout the site except when it's on the
 posts page where it should be a `rel="feed alternate"`.

 So this request would be to take this line -
 https://github.com/WordPress/WordPress/blob/master/wp-includes/general-
 template.php#L2835
 And update it as follows;
 `echo '<link rel="feed' . ( is_home() ? ' alternate' : '' ) . '" type="' .
 feed_content_type() . '" title="' . esc_attr( sprintf( $args['feedtitle'],
 get_bloginfo( 'name' ), $args['separator'] ) ) . '" href="' . esc_url(
 get_feed_link() ) . "\" />\n";`
 *Which changes that feed link from alternate to feed for all pages and
 then appends alternate if it's on the actual blog page.

 Am I correct in that assumption? Just want to be sure before heading down
 that path.
 Thanks

-- 
Ticket URL: <https://core.trac.wordpress.org/ticket/46227#comment:17>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform


More information about the wp-trac mailing list