WordPress.org

Ready to get started?Download WordPress

Forums

[closed] Request for help with wp_list_categories (2 posts)

  1. AndrewE
    Member
    Posted 6 years ago #

    Dear fellow WordPress users,

    I'd be very grateful if someone could help me out with the following problem. Thanks very much indeed.

    -------------------------------

    I am using wp_list_categories to show the categories but I want them
    formatted in a certain way as shown below.
    The odd/even class and the spans are important as I want an alternating

    background color.

    <ul>
    
    <li class="odd"><span><a href="" title="">Parent category</a>
    <ul class="clearfix">
    <li><a href="" title="">Child category</a></li>
    <li><a href="" title="">Child category</a></li>
    </ul>
    </span></li>
    
    <li><span><a href="" title="">Parent category</a>
    <ul class="clearfix">
    <li><a href="" title="">Child category</a></li>
    <li><a href="" title="">Child category</a></li>
    </ul>
    </span></li>
    
    </ul>

    Any way I can go about this? (As a last resort, is this possible by
    hacking the "category-template" file?)

  2. Kafkaesqui

    Posted 6 years ago #

    Do not post duplicate topics (even if it is under a different username):

    http://wordpress.org/support/topic/157985

Topic Closed

This topic has been closed to new replies.

About this Topic