Title: Hide Post Count
Last modified: August 18, 2016

---

# Hide Post Count

 *  [substancedigitalmedia](https://wordpress.org/support/users/substancedigitalmedia/)
 * (@substancedigitalmedia)
 * [19 years, 2 months ago](https://wordpress.org/support/topic/hide-post-count/)
 * Hi,
 * I am using the K2 theme, with the Sidebar modules plugin. My categories are listed
   in the side bar with the number of posts in each category in brackets after the
   category title. Would anyone have any idea how i can remove the brackets and 
   the number of posts – i just want the category titles. Have looked on the K2 
   forum but can not find a solution……….
 * Thanks in advance for any help!
 * Andy

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

 *  [bassetts](https://wordpress.org/support/users/bassetts/)
 * (@bassetts)
 * [19 years, 2 months ago](https://wordpress.org/support/topic/hide-post-count/#post-538105)
 * The Category List sidebar module in K2 uses the template tag “wp_list_categories”
   and the code for it is located in sidebar.php in the root of the K2 folder. If
   you open the file and find the code “wp_list_categories(‘title_li=&show_count
   =1&hierarchical=0’);” remove “&show_count=1” from that and it should display 
   how you want it to.
 * For a full list of arguments for “wp_list_categories” see [http://codex.wordpress.org/Template_Tags/wp_list_categories](http://codex.wordpress.org/Template_Tags/wp_list_categories)
 *  Thread Starter [substancedigitalmedia](https://wordpress.org/support/users/substancedigitalmedia/)
 * (@substancedigitalmedia)
 * [19 years, 2 months ago](https://wordpress.org/support/topic/hide-post-count/#post-538136)
 * HI,
 * Sorry i tried that and it didnt work – i should have mentioned that i am using
   the category access plugin……[http://www.coppit.org/code/](http://www.coppit.org/code/)
 * Anyideas what might be causing them to keep showing?
 * Cheers
 * Andy
 *  [bassetts](https://wordpress.org/support/users/bassetts/)
 * (@bassetts)
 * [19 years, 2 months ago](https://wordpress.org/support/topic/hide-post-count/#post-538157)
 * I have had a look at the code and even edited it on my website and it does not
   stop the count showing for me as well. This is the block of code that controls
   that sidebar widget;
 *     ```
       <?php
       			if (function_exists('wp_list_categories')) {
       				wp_list_categories('title_li=&show_count=1&hierarchical=0');
       			} else {
       				list_cats(0, '', 'name', 'asc', '', 1, 0, 1, 1, 1, 1, 0,'','','','','');
       			}
       			?>
       ```
   
 * if you look at the list of numbers 1, 0, 1, 1, 1, 1, 0, the third number 1 in
   is the optioncount parameter of the list_cats tag. I also tried setting that 
   to 0 but no luck.
 * I shall have a look around and try and find out the problem for you.
 *  [bassetts](https://wordpress.org/support/users/bassetts/)
 * (@bassetts)
 * [19 years, 2 months ago](https://wordpress.org/support/topic/hide-post-count/#post-538424)
 * Hi, I got an answer for you. Open up categories.php under /app/modules/ inside
   your K2 folder and edit the lines
 * `wp_list_categories('title_li=&show_count=1&hierarchical=0');`
 * and
 * `list_cats(0, '', 'name', 'asc', '', 1, 0, 1, 1, 1, 1, 0,'','','','','');`
 * to
 * `wp_list_categories('title_li=&show_count=0&hierarchical=0`
 * and
 * `list_cats(0, '', 'name', 'asc', '', 1, 0, 0, 1, 1, 1, 0,'','','','','');`
 * Thanks to [Zeo at the K2 forums.](http://getk2.com/forum/showthread.php?t=3676)
 *  Thread Starter [substancedigitalmedia](https://wordpress.org/support/users/substancedigitalmedia/)
 * (@substancedigitalmedia)
 * [19 years, 2 months ago](https://wordpress.org/support/topic/hide-post-count/#post-538461)
 * Hey there,
 * I opened that file, and that code is not contained in it – here is the only code
   in that file:
 * <?php
 * function categories_sidebar_module($args) {
    extract($args);
 *  echo($before_module . $before_title . $title . $after_title);
    ?>
    -  <?php
       if (function_exists(‘wp_list_categories’)) ?>
 *  <?php
    echo($after_module); }
 * register_sidebar_module(‘Category list module’, ‘categories_sidebar_module’, ‘
   sb-categories’);
 * ?>
 * Perhaps the category access plugin i mentioned above is causing the problem –
   there are a few php files with options in the plugin……..?
 * Cheers
 * Andy
 *  [bassetts](https://wordpress.org/support/users/bassetts/)
 * (@bassetts)
 * [19 years, 2 months ago](https://wordpress.org/support/topic/hide-post-count/#post-538482)
 * Seems like this is a question for those who know more about K2. What version 
   of K2 and WP do you have?
 *  Thread Starter [substancedigitalmedia](https://wordpress.org/support/users/substancedigitalmedia/)
 * (@substancedigitalmedia)
 * [19 years, 2 months ago](https://wordpress.org/support/topic/hide-post-count/#post-538485)
 * Hi There,
 * Its Worpdress 2.1 and K2 version and K2 0.95 RC1 by Various Artists.
 * Hope this helps solve the mystery!
 * Cheers
 * Andy
 *  [coppit](https://wordpress.org/support/users/coppit/)
 * (@coppit)
 * [19 years, 2 months ago](https://wordpress.org/support/topic/hide-post-count/#post-538486)
 * I modified app/modules/categories.php to say this:
    wp_list_categories(‘title_li
   =&show_count=0&hierarchical=0’);
 * and it removed the count for WP 2.1. Neither my Category Order or Category Access
   plugins have anything to do with it.
 *  Thread Starter [substancedigitalmedia](https://wordpress.org/support/users/substancedigitalmedia/)
 * (@substancedigitalmedia)
 * [19 years, 2 months ago](https://wordpress.org/support/topic/hide-post-count/#post-538488)
 * Hi,
 * Thanks for posting! I am new to PHP, can you cut and paste the exact code i should
   have in the whole file, like i have above – i am not good at modifying as i don’t
   know what to leave out and what to leave in!!
 * Bottle of Whiskey has been purchased……… 🙂
 * Andy
 *  Thread Starter [substancedigitalmedia](https://wordpress.org/support/users/substancedigitalmedia/)
 * (@substancedigitalmedia)
 * [19 years, 2 months ago](https://wordpress.org/support/topic/hide-post-count/#post-538489)
 * I have tried all variations of modifying, using the above posts as a guide – 
   and they are still showing up……. 🙁
 * Andy
 *  Thread Starter [substancedigitalmedia](https://wordpress.org/support/users/substancedigitalmedia/)
 * (@substancedigitalmedia)
 * [19 years, 2 months ago](https://wordpress.org/support/topic/hide-post-count/#post-538490)
 * Hi again,
 * I have sidebar modules installed – could this be causing a conflict?
 * Andy
 *  Thread Starter [substancedigitalmedia](https://wordpress.org/support/users/substancedigitalmedia/)
 * (@substancedigitalmedia)
 * [19 years, 2 months ago](https://wordpress.org/support/topic/hide-post-count/#post-538491)
 * Guys – i have it sussed! It was the sidebar module that was causing the problem!
   I applied what you told me to apply to the sidebar module catagory.php file and
   it worked!
 * Thansk so much for all your help with this……… I really really appreciate it!
 * Andy
 *  [kenshiz7](https://wordpress.org/support/users/kenshiz7/)
 * (@kenshiz7)
 * [18 years, 7 months ago](https://wordpress.org/support/topic/hide-post-count/#post-538587)
 * Hi, i have same issues here…how do i hide the post counts just after post categories
   in [my blog](http://blog.internetgecko.com)? actually display in brackets. Tried
   everything but, seems doesn’t solve it.
 * here comes the code:
 *     ```
       <div class="block">
       		<div class="menu">
       			<ul class="slightbigger">
       				<?php list_cats(FALSE, '', 'name',
                       				'asc', '', TRUE, FALSE,
                       				TRUE, FALSE, FALSE,
                       				TRUE, FALSE, '', FALSE,
                       				'', '', '1',
                       				TRUE); ?>
       			</ul>
       		</div>
       	</div>
       ```
   
 * For info, I’m using AdsMinded theme from SapiensBryan.
    Thanks for any help!

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

The topic ‘Hide Post Count’ is closed to new replies.

## Tags

 * [count](https://wordpress.org/support/topic-tag/count/)

 * In: [Fixing WordPress](https://wordpress.org/support/forum/how-to-and-troubleshooting/)
 * 13 replies
 * 4 participants
 * Last reply from: [kenshiz7](https://wordpress.org/support/users/kenshiz7/)
 * Last activity: [18 years, 7 months ago](https://wordpress.org/support/topic/hide-post-count/#post-538587)
 * Status: not resolved

## Topics

### Topics with no replies

### Non-support topics

### Resolved topics

### Unresolved topics

### All topics
