Customise wp_list_categories()
-
Hi,
I noticed on a WP-built site that a designer has Categories listed in the sidebar and the HTML output is:
<div id="left"> <h2>categories</h2> <ul class="bloglist"> <li><a href="?catId=2">branding</a></li> <li><a href="?catId=6">coursework</a></li> <li><a href="?catId=1">websites</a></li> </ul> </div>
Very clean.
However, when I use the WP code
<?php wp_list_categories('title_li=<h3>' . __('CATEGORIES') . '</h3>' ); ?>
my code comes out ugly like this:<li class="categories"><h3>Categories</h3><ul> <li class="cat-item cat-item-1"><a href="/blog/la-vie/" title="View all posts filed under La Vie">La Vie</a> </li> <li class="cat-item cat-item-4"><a href="/blog/musique/" title="View all posts filed under Musique">Musique</a> </li> <li class="cat-item cat-item-7"><a href="/blog/web/" title="View all posts filed under Web">Web</a> </li> <li class="cat-item cat-item-6"><a href="/blog/youtube/" title="View all posts filed under You Tube">You Tube</a> </li> </ul></li>
Why is this?
What is this other guy doing that I have not done?
Many thanks for any suggestions.
Viewing 5 replies - 1 through 5 (of 5 total)
Viewing 5 replies - 1 through 5 (of 5 total)
- The topic ‘Customise wp_list_categories()’ is closed to new replies.