Created
June 29, 2011 09:12
-
-
Save kijtra/1053495 to your computer and use it in GitHub Desktop.
[WordPress] wp_list_pages()の出力の際、リストタグのclass属性にページスラッグを追加する
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
add_filter( | |
'page_css_class', | |
create_function( | |
'$css_class,$page', | |
'$css_class[]=$page->post_name;return $css_class;' | |
), | |
10, | |
2 | |
); | |
?> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment