Make WordPress Core

Opened 14 years ago

Closed 8 years ago

#10180 closed enhancement (wontfix)

Add rel="prev" to previous_posts_link() and rel="next" to next_posts_link()

Reported by: singpolyma's profile singpolyma Owned by:
Milestone: Priority: normal
Severity: normal Version:
Component: Posts, Post Types Keywords: has-patch needs-testing
Focuses: template Cc:

Description

Putting proper rel values on archive next/previous links is actually not even properly possible with a plugin, so I had to use a patch

http://gist.github.com/120586

Really this should (IMHO) all go into core

http://singpolyma.net/2009/05/rel-prev-next-wordpress/

Attachments (1)

10180-link-template.php.diff (1.2 KB) - added by mtekk 14 years ago.
This is my first go at adding in the rel="next" and rel="prev". There is probably a better/faster way of doing this.

Download all attachments as: .zip

Change History (15)

#1 @demetris
14 years ago

  • Cc dkikizas@… added

What version is this patch against?

  1. 2.8 already generates some rel links of this type: prev (post), next (post), home, index.

See: http://core.trac.wordpress.org/ticket/8703

#2 @Denis-de-Bernardy
14 years ago

  • Keywords close added
  • Milestone changed from Unassigned to 2.8.1

this seems very invalid to me

#3 @dd32
14 years ago

  • Keywords close removed

#8703 added next/prev/home for single browsing, But not for archive browsing.

/archive/2009/05/ should have a next for /archives/2009/06/ etc.

I'm pretty sure thats what this ticket is asking for.

#4 @Denis-de-Bernardy
14 years ago

  • Keywords needs-patch added
  • Milestone changed from 2.8.1 to 2.9
  • Type changed from defect (bug) to enhancement

#5 @Denis-de-Bernardy
14 years ago

  • Component changed from General to Template

#7 follow-up: @mtekk
14 years ago

  • Resolution set to duplicate
  • Status changed from new to closed

I'm closing this as a duplicate of #4209. Also, the code in that github link is not a good patch as it could add a duplicate rel= attribute to the link. The patch in #4209 checks for this.

#8 @mtekk
14 years ago

  • Resolution duplicate deleted
  • Status changed from closed to reopened
  • Summary changed from rel=prev/next to Add rel="prev" to previous_posts_link() and rel="next" to next_posts_link()

I guess I should really pay more attention to things. #4209 and this cover different things (previous_post_link() vs previous_posts_link() and the next equivalents). I'm reopening and I'll have a patch soon.

@mtekk
14 years ago

This is my first go at adding in the rel="next" and rel="prev". There is probably a better/faster way of doing this.

#9 @mtekk
14 years ago

  • Keywords has-patch needs-testing added; needs-patch removed

#10 @miqrogroove
14 years ago

This needs to hit similar functions such as previous_image_link() and next_image_link()

#11 @ryan
14 years ago

  • Milestone changed from 2.9 to Future Release

#12 in reply to: ↑ 7 @singpolyma
13 years ago

Replying to mtekk:

Also, the code in that github link is not a good patch as it could add a duplicate rel= attribute to the link. The patch in #4209 checks for this.

I'm very aware that the patch+plugin I posted is a hack and not an actual solution.

#13 @nacin
9 years ago

  • Component changed from Template to Posts, Post Types
  • Focuses template added

#14 @chriscct7
8 years ago

  • Keywords changed from has-patch, needs-testing to has-patch needs-testing
  • Milestone Future Release deleted
  • Resolution set to wontfix
  • Status changed from reopened to closed

No requests for this in 5 years

Note: See TracTickets for help on using tickets.