Please Read First
Troubleshooting Tips
Frequently Asked Questions
Note: Appearance issues are often caused by caching plugins.
When Posting Please Include Your URL.
Search Forum Using Google Search Box Above
IMPORTANT: If after forum login, you appear logged out, click on "New Posts". You should show as logged in then. It's a Vbulletin bug.
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,942
    Rep Power
    14

    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 3.0
    Replies: 1
    Last Post: 08-09-2010, 04:52 PM
  2. How To Remove Pages In Sidebar!
    By markandroena in forum Official Support 3.0
    Replies: 6
    Last Post: 07-10-2010, 10:04 AM
  3. No categories in primary sidebar?
    By wosull in forum Official Support 3.0
    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 3.0
    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
  •