On My CashCow Blog, I was wondering if it was pretty straight forward to do this to my category section. Change it from this: Categories * AdSense * Affiliate Marketing * eBay * Miscellaneous Bovine Materials * The Cow Pasture To This: Categories * AdSense (14) * Affiliate Marketing (3) * eBay (5) * Miscellaneous Bovine Materials (12) * The Cow Pasture (1) See how next to each category there is a number of post in that section ? Does anyone know how I can do this ? Thanks for any help !
try this.. <?php list_cats(0, '', 'name', 'asc', '', 1, 0, 1, 1, 1, 1, 0,'','','','',''); ?> Code (markup):
Try using the "Category Order" plugin from this page: http://www.coppit.org/code/ (near the bottom) It has an option regarding post counts.
<?php wp_list_categories('orderby=id[B]&show_count=1[/B] &use_desc_for_title=0&child_of=3&title_li='); ?> Code (markup): you need the bit in bold (i.e &show_count=1)
<div class="dbx-group" id="sidebar"> <?php if ( !function_exists('dynamic_sidebar') || !dynamic_sidebar() ) : ?> <!--sidebox start --> <div id="categories" class="dbx-box"> <h3 class="dbx-handle"><?php _e('Categories'); ?></h3> <div class="dbx-content"> <ul> <?php wp_list_cats('sort_column=name&optioncount=1&hierarchical=0'); ?> </ul> </div> </div> <!--sidebox end --> <!--sidebox start --> <div id="archives" class="dbx-box"> <h3 class="dbx-handle"><?php _e('Archives'); ?></h3> <div class="dbx-content"> <ul> <?php wp_get_archives('type=monthly'); ?> </ul> </div> </div> <!--sidebox end --> <!--sidebox start --> <div id="links" class="dbx-box"> <h3 class="dbx-handle"><?php _e('Links'); ?></h3> <div class="dbx-content"> <ul> <?php get_links('-1', '<li>', '</li>', '<br />', FALSE, 'id', FALSE, FALSE, -1, FALSE); ?> </ul> </div> </div> <!--sidebox end --> <!--sidebox start --> <div id="meta" class="dbx-box"> <h3 class="dbx-handle">Meta</h3> <div class="dbx-content"> <ul> <li class="rss"><a href="<?php bloginfo('rss2_url'); ?>">Entries (RSS)</a></li> <li class="rss"><a href="<?php bloginfo('comments_rss2_url'); ?>">Comments (RSS)</a></li> <li class="wordpress"><a href="http://www.wordpress.org" title="Powered by WordPress">WordPress</a></li> <li class="login"><?php wp_loginout(); ?></li> </ul> </div> </div> <!--sidebox end --> <?php endif; ?> </div><!--/sidebar --> Hmmm Sorry for the cut n paste but cant seem to find it. Anyone help ? I checked all the files in theme but couldnt track anything resmbling the code above.
<?php wp_list_cats('sort_column=name&optioncount=1&hierarchical=0'); ?> http://codex.wordpress.org/Template_Tags/wp_list_cats your template uses a previous version of category display. http://codex.wordpress.org/Template_Tags/wp_list_categories (thats the newer version)
I am stumped I cant get it working are you able to type the exact code for me to cut n paste. I have NFI.
replace <?php wp_list_cats('sort_column=name&optioncount=1&hierarchical=0'); ?> PHP: with <?php wp_list_categories('orderby=id&show_count=1 &use_desc_for_title=0&title_li='); ?> PHP: that should work if you wantthem ordered by name rather than id change orderby=id to orderby=name
You use your theme editor in the wp admin panel and make sure to click sidebars to do what just4teens told you.
Hey Blazer, I know that part....I have done it correctly but doesnt work...... <div class="dbx-group" id="sidebar"> <?php if ( !function_exists('dynamic_sidebar') || !dynamic_sidebar() ) : ?> <!--sidebox start --> <div id="categories" class="dbx-box"> <h3 class="dbx-handle"><?php _e('Categories'); ?></h3> <div class="dbx-content"> <ul> <?php wp_list_categories('orderby=id&show_count=1&use_desc_for_title=0&title_li='); ?> </ul> </div> </div> <!--sidebox end --> <!--sidebox start --> <div id="archives" class="dbx-box"> <h3 class="dbx-handle"><?php _e('Archives'); ?></h3> <div class="dbx-content"> <ul> <?php wp_get_archives('type=mo............. I am stumped......how does this code look to you guys ? Maybe I stuffed it.
stumble on the same issue. but I got it working except the number appear below the categories. any suggestion how correct this ? thanks
Not sure about that. I believe space allocated is sufficient enough. I'm using "almost spring". here is the example.
dont know what happen. suddenly its appear ok after using shaneoj code and playing around with the template tag. thank you very much guys for your help. especially to just-4-teens and shaneoj.