Support » Requests and Feedback » Additional classes for page lists/trees

  • I described my problem in the support forum: but it seems too technical since no one responded.

    Basically, I need special classes for elements of the page list (the function wp_list_pages). Currently it marks only the current item with class current_page_item. I would like also the previous and next element to have a special class (current-prev, current-next) as well as the first and last element on the list.

    This helps to create a nice css-based design of the page list.
    For WordPress < 2.0 I used to hack wp_list_pages and _page_level_out functions in template-functions-post.php to get the classes I wanted. You can see it working here:

    Since WordPress 2.0 a new API has been introduced, with Walker class. I would not like to hack around it again, since perhaps there is an easy way to add the support for these classes by default in WordPress.

    Please let me know what you think of such feature and whether you would like to implement it in WP. And if not, I would be very willing to hear some hints on how to implement it correctly in WordPress > 2.0. so that I can do it myself, without hacking too much (preferably in a plugin).

Viewing 1 replies (of 1 total)
Viewing 1 replies (of 1 total)
  • The topic ‘Additional classes for page lists/trees’ is closed to new replies.