How to show only first level sub categories under a main category

View: New views
2 Messages — Rating Filter:   Alert me  

How to show only first level sub categories under a main category

by sunil sk :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Hi
I am a new bee in wordpress.

I have a list of categories. Under each category there are many
subcategories. How can I ** list only 1st level of subcategories under a
main category. I don't want to list 3rd level of category. I need to show
only 2nd level of category under a main category.

Thanks
_______________________________________________
wp-hackers mailing list
wp-hackers@...
http://lists.automattic.com/mailman/listinfo/wp-hackers

Re: How to show only first level sub categories under a main category

by scribu :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

If you will look at the documentation for wp_list_categories(), you'll see
there's a 'depth' argument. You can use that.


On Sun, Nov 1, 2009 at 2:59 PM, sunil sk <sksunil@...> wrote:

> Hi
> I am a new bee in wordpress.
>
> I have a list of categories. Under each category there are many
> subcategories. How can I ** list only 1st level of subcategories under a
> main category. I don't want to list 3rd level of category. I need to show
> only 2nd level of category under a main category.
>
> Thanks
> _______________________________________________
> wp-hackers mailing list
> wp-hackers@...
> http://lists.automattic.com/mailman/listinfo/wp-hackers
>



--
http://scribu.net
_______________________________________________
wp-hackers mailing list
wp-hackers@...
http://lists.automattic.com/mailman/listinfo/wp-hackers