Add class=first, class=last
-
I was just wondering if we can have a <li class=”first”> and <li class=”last”> in the core to distinguish the first and last post, category, page, etc. in a query_posts? It would help a lot in applying different CSS treatments for the first and last entry.
For example, when I use:
<?php wp_list_categories(‘show_count=1&title_li=’); ?>
the following code is generated:
<li class=”cat-item cat-item-4″>…
<li class=”cat-item cat-item-11″>…
<li class=”cat-item cat-item-23″>…Instead, could we have the follwing generated:
<li class=”cat-item cat-item-4 first”>…
<li class=”cat-item cat-item-11″>…
<li class=”cat-item cat-item-23 last”>…V
Viewing 1 replies (of 1 total)
Viewing 1 replies (of 1 total)
- The topic ‘Add class=first, class=last’ is closed to new replies.