WordPress.org

Make WordPress Core

Opened 3 years ago

Last modified 8 months ago

#18672 new enhancement

Implement rel="prev" and rel="next" for archives

Reported by: joostdevalk Owned by: joostdevalk
Milestone: Future Release Priority: normal
Severity: normal Version: 3.3
Component: Permalinks Keywords: needs-patch
Focuses: Cc:

Description

As can be seen here:

http://googlewebmastercentral.blogspot.com/2011/09/pagination-with-relnext-and-relprev.html

Google now uses rel="prev" and rel="next" to navigate paginated archives. As we already do a lot of these types of links (rel="index", rel="start" etc.) I think we should add these. I'll come up with a first version of a patch.

Change History (13)

comment:1 @joostdevalk3 years ago

Related to #18128, should probably fix in one pass.

comment:2 follow-up: @joostdevalk3 years ago

Should also consider how we use next and prev in relation to posts now. If a post is paginated, according to how Google now treats it, if you're on page 1, next should lead to the 2nd page of that post, and I don't think we do that.

comment:3 in reply to: ↑ 2 @hd-J3 years ago

Replying to joostdevalk:

Should also consider how we use next and prev in relation to posts now.

Considering this, shouldn't we remove next and prev altogether from singular pages, and keep them only for "real" pagination, such as the archive pages?

Last edited 3 years ago by hd-J (previous) (diff)

comment:4 @DJPaul3 years ago

  • Cc djpaul@… added

comment:6 follow-up: @F J Kaiser3 years ago

  • Cc 24-7@… added

I added this to my example pagination plugin some time ago. Point is that I added it to the link itself. What would be the reason to add another function and add it to the head?

comment:7 in reply to: ↑ 6 @hd-J3 years ago

Replying to F J Kaiser:

Point is that I added it to the link itself. What would be the reason to add another function and add it to the head?

Google seems to prefer the link added to the head, rather than on the link itself. Here is what they say in their annoucement:

rel=”next” and rel=”prev” only need to be declared within the <head> section, not within the document <body>.

comment:8 @alex-ye3 years ago

1+ , I fix this in my framework theme , I will send a PATCH soon .

comment:9 @mcepl2 years ago

  • Cc mcepl added

comment:10 @GaryJ20 months ago

Any patch coming from Joost or alex-ye?

comment:11 @corvannoorloos15 months ago

  • Cc cor@… added

comment:12 @wonderboymusic8 months ago

  • Keywords 2nd-opinion removed
  • Milestone changed from Awaiting Review to Future Release

comment:13 @joostdevalk8 months ago

I'd be happy to write a patch for this but when I discussed it with @nacin I got the idea this would need to incorporate rewriting some of the link generation / paginated link generation code as well... If I can get some guidance on that bit I'm happy to write the patch.

Note: See TracTickets for help on using tickets.