Please Read First
Troubleshooting Tips
Frequently Asked Questions
Before Posting Please Disable Wp Super Cache Plugin
When Posting Please Include Your URL.
Search Forum Using Google Search Box Above
Forum Video

Results 1 to 2 of 2
  1. #1
    Join Date
    Jul 2010
    Rep Power

    Default Remove Sub-Categories in Sidebar


    Is there a way to remove the sub-categories in the sidebar and only show the parent categories?

    I tried adding depth=1 to this line in the sidebar.php file:
    <li><?php wp_list_categories('show_count=1&title_li=<h2>Cate gories</h2>'); ?></li>


    <li><?php wp_list_categories('show_count=1&depth=1&title_li= <h2>Categories</h2>'); ?></li>

    but it had no effect.



  2. #2
    Join Date
    Jun 2010
    Rep Power


    For non Socrates Wordpress questions, the fastest answer can almost always be found with a quick google search.

    wordpress hide subcategories

    The simplest solution I found with a google search was to add this to style.css

    .children { display:none; }

    There are also "hide categories" plugins to do this..

Similar Threads

  1. Remove sidebar from certain pages
    By taeri in forum Official Support 3.0
    Replies: 1
    Last Post: 08-09-2010, 05:52 PM
  2. How To Remove Pages In Sidebar!
    By markandroena in forum Official Support 3.0
    Replies: 6
    Last Post: 07-10-2010, 11:04 AM
  3. No categories in primary sidebar?
    By wosull in forum Official Support 3.0
    Replies: 2
    Last Post: 07-09-2010, 01:38 PM
  4. Categories
    By evan21 in forum Bug Reporting and Fixes
    Replies: 2
    Last Post: 07-07-2010, 09:20 AM
  5. How To Remove The Right Sidebar
    By faraox in forum Official Support 3.0
    Replies: 4
    Last Post: 06-24-2010, 02:33 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts