Category & Archive Posts Counts Linking
-
Hello,
I’m trying to “fix” the category and archive listings to link the post count… to fix some display issues I have in my theme (a custom one).
Can someone please tell me why this code works for categories (wp_list_categories):
<?php $categories = wp_list_categories('title_li=&show_count=1&echo=0'); $categories = ereg_replace('</a> \(([0-9]+)\)', ' <span class="count">[\\1]</span></a>', $categories); echo $categories; ?>
But the equivalent code doesn’t work for archives (wp_get_archives):
<?php $archives = wp_get_archives('type=monthly&show_post_count=1&echo=0'); $archives = ereg_replace('</a> \(([0-9]+)\)', ' <span class="count2">[\\1]</span></a>', $archives); echo $archives; ?>
Thanks.
Viewing 2 replies - 1 through 2 (of 2 total)
Viewing 2 replies - 1 through 2 (of 2 total)
- The topic ‘Category & Archive Posts Counts Linking’ is closed to new replies.