WordPress.org

Make WordPress Core

Opened 6 years ago

Last modified 3 months ago

#6109 accepted enhancement

Add class attribute for next_posts_link and previous_posts_link

Reported by: charlieman Owned by: sorich87
Milestone: Future Release 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 6 years ago.
link-template.patch (2.4 KB) - added by sorich87 4 years ago.
here is a patch

Download all attachments as: .zip

Change History (9)

charlieman6 years ago

comment:1 Denis-de-Bernardy5 years ago

  • Keywords has-patch dev-feedback added

comment:2 Denis-de-Bernardy5 years ago

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

broken patch

comment:3 Denis-de-Bernardy5 years ago

  • Milestone changed from 2.9 to Future Release

comment:4 scohoust5 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?

comment:5 westi5 years ago

  • Keywords 2nd-opinion removed

Sounds like a reasonable idea.

Someone needs to cook up a new patch for it.

sorich874 years ago

here is a patch

comment:6 sorich874 years ago

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

comment:7 nacin3 months ago

  • Component changed from Template to Posts, Post Types
  • Focuses template added
Note: See TracTickets for help on using tickets.