Add class to links generated by next_posts_link and previous_posts_link

These two functions create anchor links, and you can customize a lot of it, but it’s impossible to add a class through just using their parameters alone. Gotta add a function to functions.php:

add_filter('next_posts_link_attributes', 'posts_link_attributes');
add_filter('previous_posts_link_attributes', 'posts_link_attributes');

function posts_link_attributes() {
  
Avatar of Chris Coyier
Chris Coyier on (Updated on )

Review of WP Coder

I was recently asked by the guys at WP Coder if I would do a review of their service. I don’t do it very often, but they seemed like nice guys and WordPress is of particular interest to me lately. …

Avatar of Chris Coyier
Chris Coyier on

Digging Into WordPress

Got a little news for y’all. Remember when I announced me and Jeff Starr were looking for a publisher for a book about WordPress? Well, that worked, and we talked a number of different publishers. They were all very nice, …

Avatar of Chris Coyier
Chris Coyier on (Updated on )

How the Quotes On Design JavaScript API Works

I keep hesitating to call it an “API”, because I’m pretty sure this isn’t quite what “API” has come to mean. But, it is programming that interfaces with an application, so whatever. Last week I introduced the bit of JavaScript …

Avatar of Chris Coyier
Chris Coyier on (Updated on )