1. Advertising
    y u no do it?

    Advertising (learn more)

    Advertise virtually anything here, with CPM banner ads, CPM email ads and CPC contextual links. You can target relevant areas of the site and show ads based on geographical location of the user if you wish.

    Starts at just $1 per CPM or $0.10 per CPC.

How Do I Make Only My Parent Categories Appear In My Sidebar?

Discussion in 'WordPress' started by kloop, Apr 29, 2008.

  1. #1
    How Do I Make Only My Parent Categories Appear In My Sidebar....I don't want the subcategories to show....Is there a plug in or coding that I can use, because I've searched everywhere and can't find a solution:confused:
     
    kloop, Apr 29, 2008 IP
  2. uglyboy

    uglyboy Peon

    Messages:
    1,963
    Likes Received:
    134
    Best Answers:
    0
    Trophy Points:
    0
    #2
    uglyboy, Apr 29, 2008 IP
    kloop likes this.
  3. kloop

    kloop Well-Known Member

    Messages:
    1,452
    Likes Received:
    34
    Best Answers:
    0
    Trophy Points:
    140
    #3
    + Rep for trying but I've seen that thread post already...I've basically seen all the topics on it in the Wordpress and most of the results from searching Google...it doesn't seem like there's an answer to this:confused:
     
    kloop, Apr 29, 2008 IP
  4. Hummerbie

    Hummerbie Active Member

    Messages:
    52
    Likes Received:
    4
    Best Answers:
    0
    Trophy Points:
    98
    #4
    Hummerbie, Apr 29, 2008 IP
  5. kloop

    kloop Well-Known Member

    Messages:
    1,452
    Likes Received:
    34
    Best Answers:
    0
    Trophy Points:
    140
    #5
    kloop, Apr 29, 2008 IP
  6. Hummerbie

    Hummerbie Active Member

    Messages:
    52
    Likes Received:
    4
    Best Answers:
    0
    Trophy Points:
    98
    #6
    @kloop: I see you are on WP version 2.5.1, so that is good news.
    You could change the code in your sidebar to <?php wp_list_cats('orderby=name&depth=1'); ?>
    Where to depth=1 only will show your topcategoriees, this is new from WP 2.5 up.
     
    Hummerbie, Apr 29, 2008 IP
  7. kloop

    kloop Well-Known Member

    Messages:
    1,452
    Likes Received:
    34
    Best Answers:
    0
    Trophy Points:
    140
    #7
    OMG!?! Your the Best, Worked Perfectly:D
     
    kloop, Apr 29, 2008 IP
  8. just-4-teens

    just-4-teens Peon

    Messages:
    3,967
    Likes Received:
    168
    Best Answers:
    0
    Trophy Points:
    0
    #8
    edit one of the posts that are in the sub-category, and make it post to parent category too.

    it will make no difference to your blog as the parent cat displays all sub-cat posts anyway, and it will not show in the sidebar unless it has a post made directly to it.

    hope that helps
     
    just-4-teens, May 2, 2008 IP