Forums
Forums / Plugins / Submenu classes
(@devfolio)
16 years, 11 months ago
<?php if (is_page( )) { $page = $post->ID; if ($post->post_parent) { $page = $post->post_parent; } $children=wp_list_pages( 'echo=0&child_of=' . $page . '&title_li=' ); if ($children) { $output = wp_list_pages ('echo=0&child_of=' . $page . '&title_li='); } } echo $output; ?>
Thats my current code, works fine. But i have a question, how can i add the class “first” at the first item, and “last” and the last items?
(@stvwlf)
this plugin http://www.technokinetics.com/plugins/page-lists-plus/ I believe lets you add a class to the first. Don’t know about last.
Thank you, very useful.
The topic ‘Submenu classes’ is closed to new replies.