Inconsistent CSS class names for listing pages/categories (1 post)

  1. Geert De Deckere
    Posted 6 years ago #

    I'm using wp_list_categories() and wp_list_pages() to generate the site navigation. Both functions create a bit of a mess of CSS classes, though.

    A mix of underscores and dashes is used.

    page_item page-item-21
    cat-item cat-item-16
    current-cat-parent current_page_parent

    Why not simply current-page here?

    current-cat current_page_item

    Also an equivalent for current_page_ancestor seems to be missing for categories (e.g. current-cat-ancestor).

    Any tips on working with this stuff? Please share your experiences.

Topic Closed

This topic has been closed to new replies.

About this Topic

  • RSS feed for this topic
  • Started 6 years ago by Geert De Deckere
  • This topic is not a support question
  • WordPress version: 2.8.4