Simply insert the snippet bellow inside your theme’s function.php file.
add_filter('next_posts_link_attributes', 'posts_link_attributes');
add_filter('previous_posts_link_attributes', 'posts_link_attributes');
function posts_link_attributes(){
return 'class="styled-button"';
}
What actually this snippet does is adding the html you return in the function to the anchor.
<a href=’link’ HERE>
So you can add ID, classes and other attributes an anchor can have. By default it will only have the href attribute.
Our WordPress themes
We have a few WordPress themes that we would like you to take a look at if you want.
check out the portfolio











Thanks for this, it’s exactly what i was looking for. Saves me wrapping the anchor in something else just to style it.
Perfect! Worked like a charm. Thanks for this
Just what I needed. Like Kipp says I don’t have to do any hacky wrapping so I can have it styled as required.
Thanks for this!