views:

29

answers:

1

I'd like to show only specific wordpress categories (with their sub-categories nested), so for example:

  • Main Category 1

    • Sub Category 1.1
    • Sub Category 1.2
  • Main Category 5

    • Sub Category 2.1
    • Sub Category 2.2

... I can hardcode it inside the sidebar template, but I'd like to know if there's any existing plugin/widget that allows this so I can easily manage category selection/update via admin panel.

Many thanks

A: 

You can accomplish this using the wp-list-categories tag. I'm assuming you're customising your template and this came up?

The function has enough parameters to customise it as you need.

Noufal Ibrahim
Yes, I'm already using wp-list-categories but it doesn't show sub-categories although I have it enabled, what could it be?
Nimbuz
If you used the wp-list-categories function and it doesn't work try checking that the CSS isn't hiding it for some reason?eg. If they are embedded lists there may be a CSS height on an <li> not allowing the sub <ul> to show?
Vian Esterhuizen
Can you post the actual invocation of the function as a snippet?
Noufal Ibrahim