solidnuts
Member
Posted 2 years ago #
I'm trying to use wp list in my template but i'd like to display all parent categories while hiding the children categories. could someone please help ? I've read all the codex wp_list functions with no luck.
Right now I'm using this but it hides the parent of the category as well.
<?php wp_list_cats('sort_column=name&exclude=265'); ?>
Hope someone can help me. thanks
solidnuts
Member
Posted 2 years ago #
ah i see now.. my lack of understanding is the problem then :P i don't know php at all so if someone could post it here so i can simply copy paste it that would be great. I'd like to list all categories while excluding 265 and all children categories.
i don't know php so if someone could post it here so i can simply copy paste it that would be great.
Thanks for your help.
I would suggest you to use this instead of wp_list_cats:
<?php
wp_list_categories('orderby=name&depth=0'); ?>