Adding Classes To previous_posts_link() And next_posts_link() In WordPress


/ Published in: PHP
Save to your folder(s)



Copy this code and paste it in your HTML
  1. add_filter('next_posts_link_attributes', 'posts_link_attributes');
  2. add_filter('previous_posts_link_attributes', 'posts_link_attributes');
  3.  
  4. function posts_link_attributes(){
  5. return 'class="styled-button"';
  6. }

URL: http://wpcanyon.com/tipsandtricks/adding-attributes-to-previous-and-next-post-links/

Report this snippet


Comments

RSS Icon Subscribe to comments

You need to login to post a comment.