• http://www.pkyi.com.

    I just installed a new theme. But the category count is missing the total count. How do I fix that so it will show the count of each category? Here is my sidebar code:

    <div id=”sidebar_left” class=”sidebar”>

    <div id=”logo”><h3>/”><?php bloginfo(‘name’) ?><!–alternative color /”> –></h3></div>

    <div id=”aboutme”>

    • <img src=”<?php bloginfo(‘template_url’) ?>/images/aboutme.gif” alt=”About me” />About
      <?php bloginfo(‘description’) ?>

    </div>

    <div id=”navcontainer”>
    <ul id=”navlist”>
    <?php wp_list_pages(‘title_li=&depth=1’); ?>

    </div>

    <?php if ( !function_exists(‘dynamic_sidebar’) || !dynamic_sidebar(‘sidebar_left’) ) : ?>
    <h2>Categories</h2>

      <?php wp_list_cats(‘&title_li=’); ?>

    <?php endif; ?>

    </div>

    <div id=”sidebar_right” class=”sidebar”>

    <div class=”search”>
    <form method=”get” id=”searchform” action=”<?php bloginfo(‘home’); ?>”>
    <input class=”searchinput” type=”text” value=”<?php echo wp_specialchars($s, 1); ?>” name=”s” id=”search_query” />
    <input class=”searchbutton” type=”submit” value=”Find” />
    </form>
    </div>

    <?php if ( !function_exists(‘dynamic_sidebar’) || !dynamic_sidebar(‘sidebar_right’) ) : ?>
    <h2>Archives</h2>

      <?php wp_get_archives(‘type=monthly’); ?>

    <?php
    if (wp_version() == ’20’) {
    $link_cats = $wpdb->get_results(“SELECT cat_id, cat_name FROM $wpdb->linkcategories”);
    }
    else {
    $link_cats = $wpdb->get_results(“SELECT cat_id, cat_name FROM $wpdb->categories WHERE link_count >= 1”);
    }
    foreach ($link_cats as $link_cat) {
    ?>
    <h2 class=”h2″><?php echo $link_cat->cat_name; ?></h2>

      <?php get_links($link_cat->cat_id, ‘

    • ‘, ‘
    • ‘, ‘
      ‘, FALSE, ‘name’, FALSE, FALSE, -1); ?>

    <?php } ?>
    <?php endif; ?>
    </div>

Viewing 3 replies - 1 through 3 (of 3 total)
Viewing 3 replies - 1 through 3 (of 3 total)

The topic ‘category count for new theme’ is closed to new replies.