• hi.

    using the wp_list_categories function thing.

    how is it possible to make the post count (i.e. the (1) or whatever in brackets part of the actual clickable link that is the name of the category? how do i make the whole thin a link. thanks.

Viewing 2 replies - 1 through 2 (of 2 total)
  • Thread Starter 750528

    like i mean the number (post count) that goes beside the name of the category in your sidebar.

    How do you make that a link to the category?

    The name of the category already is a link.

    php global $post;
    $myposts = get_posts(‘numberposts=1&offset=0&category=25’);
    foreach($myposts as $post) : setup_postdata($post);
    function the_category_link( $cat_id ){$o = wp_cache_get( $cat_id, ‘category’ );
    print $o->count; }
    YOUR CATEGORY NAME
    php the_category_link(25);

    php endforeach;

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Category post count as a link’ is closed to new replies.