Return to Snippet

Revision: 10030
at December 4, 2008 00:18 by Ashung


Initial Code
<div class="nav">
<ul>
<?php wp_list_categories('title_li='); ?>
</ul>
</div>

<div class="nav">
<ul>
<?php
$variable = wp_list_categories('echo=0&orderby=name&show_count=1&child_of=1&feed=RSS&title_li=');
$variable = str_replace(array(') ('), '</span> <span class="counts">', $variable);
$variable = str_replace(array('('), '<span>', $variable);
$variable = str_replace(array(')'), '</span>', $variable);
echo $variable;
?>
</ul>
</div>

<div class="nav">
<ul>
<?php
$variable = wp_list_categories('echo=0&show_count=1&title_li=');
$variable = str_replace(array('('), '<span class="counts">', $variable);
$variable = str_replace(array(')'), '</span>', $variable);
echo $variable;
?>
</ul>
</div>

Initial URL

                                

Initial Description
reference:
http://codex.wordpress.org/Template_Tags/wp_list_categories

Initial Title
Wordpress Categories Nav

Initial Tags
wordpress

Initial Language
PHP