Make WordPress Core

Opened 17 years ago

Closed 10 years ago

#6109 closed enhancement (fixed)

Add class attribute for next_posts_link and previous_posts_link

Reported by: charlieman's profile charlieman Owned by: sorich87's profile sorich87
Milestone: 2.7 Priority: normal
Severity: minor Version:
Component: Posts, Post Types Keywords: has-patch
Focuses: template Cc:

Description

Usually i see myself adding divs or spans around links generated with next_posts_link and previous_posts_link to style them. They should have a parameter where one could add the class attribute for the link.

Attachments (2)

link-template.php (1.5 KB) - added by charlieman 17 years ago.
link-template.patch (2.4 KB) - added by sorich87 15 years ago.
here is a patch

Download all attachments as: .zip

Change History (10)

#1 @Denis-de-Bernardy
16 years ago

  • Keywords has-patch dev-feedback added

#2 @Denis-de-Bernardy
16 years ago

  • Component changed from General to Template
  • Keywords needs-patch added; has-patch dev-feedback removed

broken patch

#3 @Denis-de-Bernardy
16 years ago

  • Milestone changed from 2.9 to Future Release

#4 @scohoust
16 years ago

  • Keywords 2nd-opinion added

The next_posts_link_attributes filter could be used here or would adding a class be a better solution?

#5 @westi
16 years ago

  • Keywords 2nd-opinion removed

Sounds like a reasonable idea.

Someone needs to cook up a new patch for it.

@sorich87
15 years ago

here is a patch

#6 @sorich87
15 years ago

  • Keywords has-patch added; needs-patch removed
  • Owner changed from anonymous to sorich87
  • Status changed from new to accepted

#7 @nacin
11 years ago

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

#8 @wonderboymusic
10 years ago

  • Milestone changed from Future Release to 2.7
  • Resolution set to fixed
  • Status changed from accepted to closed

'next_posts_link_attributes'

'previous_posts_link_attributes'

Since [8502]

Note: See TracTickets for help on using tickets.