showing categories and subcategories on index.php

Discussion in 'WordPress' started by angrezy, Feb 3, 2010.

  1. #1
    Hi All,
    I am working on classified website powered by wordpress.
    I want to put all categories and subcategories on index.php as you see it on quickr.com.
    thought i could do it in two ways but it has some issues:
    1)
    <?php wp_list_categories('show_count=0&hide_empty=0&exclude=1&orderby=name&order=asc &title_li=&child_of=' ');?>
    though i got the list, but I dont know how to present it well.

    2)
    <div id="indexCat">
    <span class="clear"/>
    <ul>
    <li><?php $cat = 15; $thisCategory = get_category(15); $catName = $thisCategory->cat_name; echo $catName;?></li>
    <?php wp_list_categories('show_count=0&hide_empty=0&exclude=1&orderby=name&order=asc &title_li=&child_of='.$cat);?>
    </ul>
    </div>

    With this method i can show results based on Category ID.

    Is there a way where i can pull all categories and subcategories and frame it in tables.
     
    angrezy, Feb 3, 2010 IP
  2. hmansfield

    hmansfield Guest

    Messages:
    7,904
    Likes Received:
    298
    Best Answers:
    0
    Trophy Points:
    280