Wordpress Hierarchical Category Indent

Im dissapointed to know that eventhough there is Wordpress support forum for those who seek for help on codings, yet most of their suggestions are quite misleading. Therefore im posting up this entry for those who wish to display their Wordpress category in a hierarchical indent format.

Here is the trick to make the child category indent :-

In your sidebar.php

look for

PHP:
< ?php list_cats(0, '', 'name', 'asc', '', 1, 0, 1, 1, 1, 1, 0,'','','','','') ?>

and replace with

PHP:
< ?php list_cats(FALSE, '', 'name',
                        'asc', '', TRUE, FALSE,
                        TRUE, FALSE, FALSE,
                        TRUE, FALSE, '', FALSE,
                        '', '', '',
                        TRUE); ?>

That's it! Category Indentation Done :lol:

If you are using "wp_list_cats" to list out all your categories, you can switch to "list_cats", both of them perform the same, except "list_cats" provides you easier options in displaying all your category.

How does it work: There are total of 18 arguement to be passed into "list_cats", and the 10th arguement (which is the 3rd TRUE value) is what you need to change, change it to TRUE will list the child category indent.

To understand more, you can refer to: Wordpress Codex Template Tags

Thanks to Sapienbryan for the help.

p/s: This solution is for those who still using WP1.5, looks like they have solved this bug in WP1.5.1

Send a friend | Permalink

Related Links



Strict Standards: Only variables should be assigned by reference in /home/kahsoon/public_html/wp-includes/functions.php on line 589

Strict Standards: Only variables should be assigned by reference in /home/kahsoon/public_html/wp-includes/functions.php on line 589

Strict Standards: Only variables should be assigned by reference in /home/kahsoon/public_html/wp-includes/functions.php on line 589

Strict Standards: Only variables should be assigned by reference in /home/kahsoon/public_html/wp-includes/functions.php on line 589

Strict Standards: Only variables should be assigned by reference in /home/kahsoon/public_html/wp-includes/functions.php on line 589

Strict Standards: Only variables should be assigned by reference in /home/kahsoon/public_html/wp-includes/functions.php on line 589

Strict Standards: Only variables should be assigned by reference in /home/kahsoon/public_html/wp-includes/functions.php on line 589

Strict Standards: Only variables should be assigned by reference in /home/kahsoon/public_html/wp-includes/functions.php on line 589

Strict Standards: Only variables should be assigned by reference in /home/kahsoon/public_html/wp-includes/functions.php on line 589

Strict Standards: Only variables should be assigned by reference in /home/kahsoon/public_html/wp-includes/functions.php on line 589
  • I got the WordPress.com Golden Ticket!
  • Kahsoon.com Wordpress Blog Stats
  • New Wordpress Template
  • Wordpress Comment Spam Blocker
  • Archive Post Counter In Wordpress
  • Wordpress Template Tweaks
  • Creating a new custom page in Wordpress
  • Mecha for Sale
  • Jump Jump
  • Twin Turbine Toyota

  • This site is hosted under Dual Xeon Dedicated Server. If you are looking for Dedicated Server as well, please visit Hosting Zoom for their Fully Managed Dedicated Servers Offer. Their high performance servers come with 1000 GB of monthly data transfer and dual 80 GB drives.

    Latest Posts



    Strict Standards: Only variables should be assigned by reference in /home/kahsoon/public_html/wp-includes/functions.php on line 589

    Strict Standards: Only variables should be assigned by reference in /home/kahsoon/public_html/wp-includes/functions.php on line 589

    Strict Standards: Only variables should be assigned by reference in /home/kahsoon/public_html/wp-includes/functions.php on line 589

    Strict Standards: Only variables should be assigned by reference in /home/kahsoon/public_html/wp-includes/functions.php on line 589

    Strict Standards: Only variables should be assigned by reference in /home/kahsoon/public_html/wp-includes/functions.php on line 589

    Strict Standards: Only variables should be assigned by reference in /home/kahsoon/public_html/wp-includes/functions.php on line 589

    Strict Standards: Only variables should be assigned by reference in /home/kahsoon/public_html/wp-includes/functions.php on line 589

    Strict Standards: Only variables should be assigned by reference in /home/kahsoon/public_html/wp-includes/functions.php on line 589

    Strict Standards: Only variables should be assigned by reference in /home/kahsoon/public_html/wp-includes/functions.php on line 589

    Strict Standards: Only variables should be assigned by reference in /home/kahsoon/public_html/wp-includes/functions.php on line 589
  • Philippines Prison Thriller
  • Simpsonize Me
  • Harry Potter and the Deathly Hallows Spoiler T-Shirt
  • Iron Man Movie Trailer
  • Screamin Beans
  • Funny Cursor
  • Mentos and Carlsberg
  • Death Note
  • Real Snake Game
  • Inside PS3


  • Deprecated: Function split() is deprecated in /home/kahsoon/public_html/wp-includes/cache.php on line 215

    Deprecated: Function split() is deprecated in /home/kahsoon/public_html/wp-includes/cache.php on line 215

    Deprecated: Function split() is deprecated in /home/kahsoon/public_html/wp-includes/cache.php on line 215