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
    Posts
    22
    Rep Power
    0

    Default Remove Sub-Categories in Sidebar

    Hello,

    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>

    to:

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

    but it had no effect.

    Thanks!

    Sue

  2. #2
    Join Date
    Jun 2010
    Location
    Maine
    Posts
    7,043
    Rep Power
    11

    Default

    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
    Replies: 1
    Last Post: 08-09-2010, 04:52 PM
  2. How To Remove Pages In Sidebar!
    By markandroena in forum Official Support
    Replies: 6
    Last Post: 07-10-2010, 10:04 AM
  3. No categories in primary sidebar?
    By wosull in forum Official Support
    Replies: 2
    Last Post: 07-09-2010, 12:38 PM
  4. Categories
    By evan21 in forum Bug Reporting and Fixes
    Replies: 2
    Last Post: 07-07-2010, 08:20 AM
  5. How To Remove The Right Sidebar
    By faraox in forum Official Support
    Replies: 4
    Last Post: 06-24-2010, 01: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
  •