I am declaring this filter in my function.php file:
<?php add_filter('next_posts_link_attributes', 'posts_link_attributes'); function posts_link_attributes() { return 'class="styled-button"'; } ?> but get this back:
Fatal error: Cannot redeclare posts_link_attributes() (previously declared in functions.php in index.php)
Because I use next_post_link() in index.php
Is there a solution for this? a reason this doesn't work?
Thanks for your help guys!