Categories…
-
If I have this…
<?php
$categories = get_categories();
foreach ($categories as $cat) {
$option = ‘<option value=”/category/archives/’.$cat->category_nicename.'”>’;
$option .= $cat->cat_name;
$option .= ‘(‘.$cat->category_count.’)
‘;
$option .= ‘</option>’;
echo $option;
}
?>Which gives me this…
Category #1 (15)
Category #2 (6)
Category #3 (23)How would I integrate commands into the above code to make each of the category listings a click-able link?
Thanx.
Viewing 1 replies (of 1 total)
Viewing 1 replies (of 1 total)
- The topic ‘Categories…’ is closed to new replies.