Created
June 6, 2013 13:36
-
-
Save sutter/5721523 to your computer and use it in GitHub Desktop.
Custom next & prev post link
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Add custom class to link NEXT & PREV | |
function popy_add_class_next_post_link($html){ | |
$html = str_replace('<a','<a class="icon-next"',$html); | |
return $html; | |
} | |
add_filter('next_post_link','popy_add_class_next_post_link',10,1); | |
function popy_add_class_previous_post_link($html){ | |
$html = str_replace('<a','<a class="icon-prev"',$html); | |
return $html; | |
} | |
add_filter('previous_post_link','popy_add_class_previous_post_link',10,1); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment