以下のWordpressページ送りのテンプレートタグにclassを付けたい。Jqueryかましたり色々したいんで・・・
▼加工していないソース
<?php next_posts_link('&laquo; PREV'); ?> <?php previous_posts_link('NEXT &raquo;'); ?>
▼functions.phpに以下のコードを追加
add_filter('next_posts_link_attributes', 'my_next_posts_link_attributes');
add_filter('previous_posts_link_attributes', 'my_previous_posts_link_attributes');
function my_next_posts_link_attributes() {
return 'class="next"';
}
function my_previous_posts_link_attributes() {
return 'class="back"';
}