Forums

[resolved] Category Drop Down List Not Workgin (5 posts)

  1. funkton
    Member
    Posted 2 years ago #

    Hi
    I ahve this

    <?php wp_dropdown_categories('hide_empty =0','child_of=5'); ?>

    but it is not bringing up the empty categories..
    Is there something wrong with it???
    Cheers
    Mat

  2. peterjharrison
    Member
    Posted 2 years ago #

    Hi,

    I think its a syntax error in your code try this line instead.

    <?php wp_dropdown_categories('hide_empty =0&child_of=5'); ?>

    Regards
    Peter

  3. funkton
    Member
    Posted 2 years ago #

    hi
    Thanks for that!
    It still isn't bringing up all the subcategories.
    Only the ones with articles which is not what I want.
    the hide_empty doesn't seem to be working...

  4. peterjharrison
    Member
    Posted 2 years ago #

    Hi,

    Try removing the space after hide_empty:

    <?php wp_dropdown_categories('hide_empty=0&child_of=5'); ?>

    I can't see why this wouldn't work, as long as you have your child id correct.

    Regards
    Peter

  5. funkton
    Member
    Posted 2 years ago #

    It's always the simplest of things!!!
    cheers for that the space was the culprit!
    Cheers
    Mat

Topic Closed

This topic has been closed to new replies.

About this Topic