Skip to content

Instantly share code, notes, and snippets.

@billerickson
Created April 19, 2016 17:43
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save billerickson/84ae987b1cf09d38868246812fbdcab4 to your computer and use it in GitHub Desktop.
Save billerickson/84ae987b1cf09d38868246812fbdcab4 to your computer and use it in GitHub Desktop.
<?php
/**
* Previous/Next links as button
* @author Bill Erickson
* @link http://www.billerickson.net/code/previous-next-links-as-button
*
* @param string $attr, link attributes
* @return string
*/
function be_pagination_attr( $attr ) {
$attr .= ' class="button"';
return $attr;
}
add_filter( 'previous_posts_link_attributes', 'be_pagination_attr' );
add_filter( 'next_posts_link_attributes', 'be_pagination_attr' );
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment