Plugin Directory

Classy wp_list_pages

Author: Alex Dunae

This plugin adds classes or IDs (your choice) to the LI tags generated by WordPress' wp_list_pages() (see more in the WordPress Codex) function.

I found it very frustrating to style the output of wp_list_pages() without having access to these attributes. This plugin allows you to style the output of wp_list_pages() 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 the page has no URL then no class or ID is added. Existing classes (e.g. page_item or current) are left untouched.

Configuration

Using the Classy wp_list_pages tab in the options panel you can choose whether you want to use IDs or classes, set the token separator and add an optional token prefix.

Pretty straight forward...

Download

FYI

Average Rating

5 stars
4 stars
3 stars
2 stars
1 star
(3 ratings)