Viewing 3 replies - 1 through 3 (of 3 total)
  • put that function call inside a div with an id or class assigned. Then, in your css, you can target the list items or list inside that id or class, as in

    my markup:
    <div id="menuitems"><?php wp_list_cats('child_of=25','<li>','</li>'); ?></div>

    my css:
    #menuitems ul {…}
    #menuitems ul li {…}

    does that work for you? You don’t have to apply class to each li tag… just create a wrapper that identifies that particular list to apply styles.

    Casey

    Thread Starter the_rob

    (@the_rob)

    hmmm….. let me look at my CSS to see if this is a possibility.

    Meanwhile, Is it safe to say that '<li class=menuitem>','</li>' is not possible?

    rob

    well, it would have to be <li class=”menuitem”> to be valid. Did you try adding the quotes?

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘add class to wp_list_cats?’ is closed to new replies.