I just finished using the get_categories function in the sidebar, and it looks like this:
<h4>Categories</h4>
<ul>
<?php
$args = array(
'type' => 'post'
);
$categories = get_categories($args);
foreach ($categories as $cat) {
$option .= '<li><a href="/category/';
$option .= $cat->cat_name;
$option .= '">';
$option .= $cat->cat_name;
$option .= '</a></li>';
echo $option;
}
?>
</ul>
It works and all, but shows multiple of the same category. Take a look: http://www.ju1c3.com
Anyone know why?