1
2
3
4
5
6
7
8
9 <!-- !Categories Dropdown -->
<ul class="dropdown-menu" role="menu" aria-labelledby="categories">
<?php $args=array( 'orderby' => 'name', 'order' => 'ASC', 'show_count' => 1 );
$categories=get_categories($args);
foreach($categories as $category) {
echo '<li><a href="' . get_category_link( $category->term_id ) . '" title="' . sprintf( __( "View all posts in %s" ), $category->name ) . '" ' . '>' . $category->name. ' ('. $category->count . ')</a> </li> ';
} ?>
</ul>
</div>
wp_nav_menu()
December 8, 2012/ Updated: December 8, 2012