WordPress.org

Ready to get started?Download WordPress

Forums

Additional classes for page lists/trees (2 posts)

  1. michuk
    Member
    Posted 7 years ago #

    I described my problem in the support forum: http://wordpress.org/support/topic/108766 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: http://polishlinux.org

    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).

  2. michuk
    Member
    Posted 7 years ago #

    Anybody...?

Topic Closed

This topic has been closed to new replies.

About this Topic