Opened 9 months ago
Meaningless adjacent post links for pages
|Reported by:||mdgl||Owned by:|
In WP 3.3 we removed a number of obsolete <link> elements from the page header leaving just those with rel="next" and rel="prev" generated by function adjacent_post_rel_link_wp_head() in file wp-includes/link-template.php [see #18128].
This change brings the function of these links into sharper relief and raises several concerns. Presently, they are generated only for singular pages/posts that are not attachments.
Such links make some kind of sense for ordinary posts, because these can be considered to be part of an ordered collection where the next/previous relationship is meaningful. It may also make sense for custom post types, depending on the use to which they are being put.
For pages, however the links generated refer to the next/previous pages as they happen to be stored in the WP database and these are unlikely to have any meaningful relation to the originating page.
You can see their point! If I'm viewing page "about" what are the chances that I will next want to view the page "contact" just because this happens to have the next sequential ID in the WordPress database?
At the very least, I believe that these links should not be generated for pages. Better still would be to follow Google's advice [see #18672] and use these just for paginated content (i.e. individual posts/pages [with <!--nextpage-->] or archives [including blog home]). Some potential patch code is available against #18660 which raised a similar issue. Links between adjacent posts can be left to the usual navigation elements within the page body.