Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
[WordPress] wp_list_pages()の出力の際、リストタグのclass属性にページスラッグを追加する
<?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