Adds a uniqe class or ID attribute to each LI tag generated by wp_list_pages() and wp_nav_menu() allowing them to be individually styled with CSS.
As of April 2026, Plugin Name: Classy wp_list_pages is a WordPress id plugin with 60 active installations and a 0/5 rating0. It has been downloaded 14K+ times in total. Requires WordPress 2.2+ and PHP false+. Available on WordPress.org since 2007. Last updated 15 years ago — may have compatibility concerns. Top alternative: Reveal IDs.
This plugin adds classes or IDs (your choice) to the LI tags generated by WordPress’ wp_list_pages() and wp_nav_menu() functions.
I found it very frustrating to style the output of these menus without having access to these attributes. This plugin allows you to style the output of wp_list_pages() and wp_nav_menu() with CSS.
The class name or ID is derived from the URL of the page.
For example,
/about/ could have the class about. /about/faq/ could have the class about_faq.If a page does not have a URL (e.g. your front page) the plugin will set the class or id (depending on what you selected) to frontpage, adding whatever prefix you requested.
For example,
/ could have the class pg_frontpage. Existing classes (e.g. page_item or current) are left untouched.
<li…| WordPress | 2.2+ requiredTested up to 3.0.5 |
| PHP | false+ required |
Plugin data sourced from WordPress.org. Analysis and metrics by PluginSift.