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.

Wordpress Categories / Plugin Help

Discussion in 'WordPress' started by adamjthompson, Aug 3, 2007.

  1. #1
    Hello,

    I'm working on a blog that will have a few parent categories, and each parent category will have dozens, maybe hundreds of child categories. I need a way for the categories list to only show the parent categories. If you clicked on a parent category (and/or) visited the parent category page), you would see the child categories for that parent category.

    So, for example, the category list on the homepage would be:

    Cat 1
    Cat 2
    Cat 3
    Cat 4

    If you clicked on Cat 2, you would then see:

    Cat 1
    Cat 2
    -Cat 2.1
    -Cat 2.2
    -Cat 2.3
    -Cat 2.4
    -Cat 2.5
    -Cat 2.6
    Cat 3
    Cat 4

    How can I do this?

    Thanks for the help! (green for anyone who helps. :))

    ~Adam
     
    adamjthompson, Aug 3, 2007 IP
  2. uglyboy

    uglyboy Peon

    Messages:
    1,963
    Likes Received:
    134
    Best Answers:
    0
    Trophy Points:
    0
    #2
    uglyboy, Aug 3, 2007 IP
    adamjthompson likes this.
  3. WACMan

    WACMan Peon

    Messages:
    253
    Likes Received:
    18
    Best Answers:
    0
    Trophy Points:
    0
    #3
    I have used many like this, Fold Category List worked the best for me.
     
    WACMan, Aug 4, 2007 IP
  4. adamjthompson

    adamjthompson Well-Known Member

    Messages:
    1,242
    Likes Received:
    59
    Best Answers:
    0
    Trophy Points:
    125
    #4
    Hmmm...OK. I have WP 2.2 and am displaying the categories via the widgets functions. How do I get the Fold Categories plugin to function???

    The instructions say:

    To use, simply replace the code fragment that looks like this
    <?php wp_list_cats ($args); ?>
    Code (markup):
    with this:
    <?php wswwpx_fold_category_list ($args); ?>
    Code (markup):
    But I can't find those lines of code in sidebar.php for my theme...

    Thanks,
    Adam
     
    adamjthompson, Aug 6, 2007 IP
  5. WACMan

    WACMan Peon

    Messages:
    253
    Likes Received:
    18
    Best Answers:
    0
    Trophy Points:
    0
    #5
    If you are displaying categories as a widget it may be in that code.

    I do not use widgets so just guessing!

    The code:

    <?php wp_list_cats ($args); ?> may be <?php wp_list_cats (); ?> (I have not seen the $args in any of mine.)
     
    WACMan, Aug 6, 2007 IP
    adamjthompson likes this.
  6. adamjthompson

    adamjthompson Well-Known Member

    Messages:
    1,242
    Likes Received:
    59
    Best Answers:
    0
    Trophy Points:
    125
    #6
    Thank you. Both suggestions were accurate and helpful! I found the code to replace in wp-includes/widgets.php and the function was actually wp_list_categories.

    Thanks,
    Adam
     
    adamjthompson, Aug 6, 2007 IP