I wonder how to add id attribute to links generated by previous_posts_link()
and next_posts_link()
functions. I found that I can add class with this code:
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"';
}
But how to to do with id
attribute ?
I believe you could simply use multiple filters to handle this: